DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Restrict access to login page by IP address

 6 Replies
 2 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
Growing Member
Posts: 38
Growing Member

Hi, we run a multi portal instance of DNN and would like to allow access to any of the portal login pages to 1 or 2 specified IP Address only, therefore restricting access to our own network users only..
I see lots of example of limiting whole websites to IP,  but I want the public to be able to access the sites as normal just not the login pages.

I believe this can be done via the web config so just looking for best examples how we might achieve this and perhaps re-direct blacklisted users somewhere else (maybe a message page)?

Growing Member
Posts: 51
Growing Member
I think you can do this with the IIS Redirect module.

https://www.google.com/se...ceid=chrome&ie=UTF-8

You want the inverse of what this fellow wants... https://forums.iis.net/t/...+on+IP+address+range
Senior Member
Posts: 1325
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By Stuart on 01 May 2020 05:15 AM

Hi, we run a multi portal instance of DNN and would like to allow access to any of the portal login pages to 1 or 2 specified IP Address only, therefore restricting access to our own network users only..
I see lots of example of limiting whole websites to IP,  but I want the public to be able to access the sites as normal just not the login pages.

I believe this can be done via the web config so just looking for best examples how we might achieve this and perhaps re-direct blacklisted users somewhere else (maybe a message page)?

AFAIK DNN 9 has that option under security > login settings > login ip filters

 

 

Growing Member
Posts: 38
Growing Member
Is that option not just for host/administrators though, I want to redirect any user not whitelisted from the login page.
Senior Member
Posts: 1325
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

Hmm, I though it was for anyone.
If you need more specific filtering a custom authentication provider (requires .net development) is the only reliable option I know of.

New Around Here
Posts: 16
New Around Here

IIS Redirect module is good solution if it's available/installed on your server. Probably way easier than developing a custom authentication provider.

Another solution is to use Cloudflare. I made the move to Cloudflare a year ago and it's working really well. I removed all the IIS Redirect rules and use Cloudflare firewall rules instead.

Growing Member
Posts: 38
Growing Member

That is a very good idea

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved