• Login
  • Register

DNN Forums

A community discussion page. We're starting from scratch, so...let's get the party started!

Restrict access to login page by IP address

You are not authorized to post a reply.
Sort:


Basic Member


Posts:33
Basic 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)?



    New Member


    Posts:11
    New Member

      I think you can do this with the IIS Redirect module.

      https://www.google.com/search?q=iis+redirect+based+on+ip+address&oq=iis+redirect+ip+add&aqs=chrome.4.0j69i57j0l3.16511j0j7&sourceid=chrome&ie=UTF-8

      You want the inverse of what this fellow wants... https://forums.iis.net/t/1207239.aspx?redirect+a+page+based+on+IP+address+range
      Thanks,
      Richard
      www.dynamisys.co.uk


      Veteran Member


      Posts:563
      Veteran Member

        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

         

         



        Basic Member


        Posts:33
        Basic Member

          Is that option not just for host/administrators though, I want to redirect any user not whitelisted from the login page.


          Veteran Member


          Posts:563
          Veteran Member

            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 Member


            Posts:13
            New Member

              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.



              Basic Member


              Posts:33
              Basic Member

                That is a very good idea

                You are not authorized to post a reply.

                These Forums are dedicated to discussion of DNN Platform.

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

                1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
                2. 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.
                3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                4. No Flaming or Trolling.
                5. No Profanity, Racism, or Prejudice.
                6. Site Moderators have the final word on approving / removing a thread or post or comment.
                7. 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