We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

How to restrict a IIS7 web site to a specific range of IP address? [Answered]RSS

9 replies

Last post Aug 23, 2012 04:32 PM by smason

  • How to restrict a IIS7 web site to a specific range of IP address?

    Nov 17, 2008 04:26 PM|garyfuhr|LINK

    How to restrict a IIS7 web site to a specific range of IP address?  Want to restrict a web site to only local (internal) IP addresses.  TIA, gary.

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    Nov 17, 2008 07:04 PM|CarlosAg|LINK

    One easy way is to use IP Restrictions:

    http://technet.microsoft.com/en-us/library/cc730889.aspx

    Make sure to mark the "Access for unspecified clients" to Deny in the "Edit Feature Settings..." dialog

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    Nov 17, 2008 08:42 PM|garyfuhr|LINK

    okay, that appears to be what I'm looking for.  However ...

    1. It's not clear how to setup the IP address range.  It seems you have to enter 192.168.1.0 with a mask of 255.255.255.0 to allow IP addresses in the 192.168.1.x range, correct?

    2. Also, it appears a "deny" is required.  How to set a deny range for all public IP addresses?  "*" for all does not work.

    TIA, Gary.

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    Nov 18, 2008 02:28 AM|garyfuhr|LINK

    1. It seems my assumption on how to setup IP address range is correct.  Don't see a way to block 10 IP addresses within the range if required, other than entering each one.  Luckily the whole range will do.

    2. Missed this point ... solves this issue.
    >> Make sure to mark the "Access for unspecified clients" to Deny in the "Edit Feature Settings..." dialog

    thanks.

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    Oct 12, 2010 11:20 PM|jason2k|LINK

    This is a server level configuration.

    Is it possible if I only wish to restrict a range of IP address for one particular website and another range of IP address for another website on the same server?

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    May 05, 2012 01:49 AM|varung4|LINK

    You can follow the same steps given in http://technet.microsoft.com/en-us/library/cc730889.aspx post after selecting the site you want to set the rule for.

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    May 09, 2012 05:52 PM|murph1329|LINK

    no you can't

    Management Service is only for the server node in IIS.  It will not show up on web site feature views.  Basically it's an all or nothing setting which is.....stupid.

     The OP wanted to restrict a web site to an IP or range of IPs, so the post marked as answered is wrong.

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    May 16, 2012 01:12 PM|hrb|LINK

    Because we employ a network load balancer an IP based solution will not work for me so instead I would like to be able to do the same thing in a different way:

    I would like to restrict access by the request domain name (ex: www.contoso.com)
      or better
    restrict access by the request domain name and only for a single folder (ex: www.contoso.com/ra)

    Is this possible?

    thanks in advance...
    HR 

     

     

    domain name Restrict Access ii7

  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    May 30, 2012 02:23 PM|evaporated|LINK

    What kind of load balancer does your company use? If it's F5, you can easily do it within the F5 via iRules on the VIP.
  • Re: How to restrict a IIS7 web site to a specific range of IP address?

    Aug 23, 2012 04:32 PM|smason|LINK

    @jason2k:

    I was able to apply the restrictions to a single web site on the server.  These instructions work well for that too -- just select the web site and click on the IP Address and Domain Restrictions feature from there.