22

I'm trying to block various IP addresses from every site that I have hosted from an server running Windows 2008 and IIS7. I've found various information about how to do this using Deny rules from "IPv4 Address and Domain Name Deny Rules (IIS 7)" in the Features View of the IIS7 manager (http://technet.microsoft.com/en-us/library/cc733090(WS.10).aspx), but I don't have any icon that reads like that.

How do I get that UI in my IIS manager?

fordareh
  • 660
  • 1
  • 7
  • 16
  • Note: same user asked about another way to solve the same problem in another question. No problem, but noting for the record. http://serverfault.com/questions/86811/best-way-to-use-large-ip-blacklist-to-deny-access-to-a-windows-2008-web-server – tomjedrz Nov 21 '09 at 01:54
  • Just to clarify, this question is about how to enable the "IPv4 Address and Domain Restrictions" in IIS7 on W2K8 to deny specific IPs and the other is about where to find an external program capable of handling blacklists with 1000s of IPs. – fordareh Nov 23 '09 at 05:04

3 Answers3

29

OK, so it turns out, the Role has to be added. I went to Server Manager > Roles > Add Role Services. Under Security node in the Role Services tree there is an option for IP and Domain Restrictions.

Checking that installed the role services and now my IIS Manager has an icon for "IPv4 Address and Domain Restrictions". Feels like this should be installed by default.

***Note: the installer warns about a restart but I was not prompted for one after the install completed. My sites all stayed up during the install as well.

fordareh
  • 660
  • 1
  • 7
  • 16
  • What if I'm on a shared hosting? I can only use Remote IIS, and I can't find an option to block an IP range... – Thomas Levesque Nov 08 '12 at 02:18
  • @ThomasLevesque - Unfortunately, I don't think I can be of any help here. You'll probably want to post that question directly and perhaps reference this one. Good luck. – fordareh Nov 08 '12 at 19:07
2

Put a firewall in front of your server and configure it to block the IP's you want to block

Zak
  • 1,032
  • 2
  • 15
  • 25
-2

EDIT: The following answer is wrong. I fail.

Take a look at the TechNet article "Configure IPv4 Address Restrictions for Remote Connections (IIS 7)" at this URL: http://technet.microsoft.com/en-us/library/cc730889(WS.10).aspx

Wesley
  • 32,320
  • 9
  • 80
  • 116
  • This seems more related to restricting the users who can remotely manage the sites not view them. Please correct me if I'm wrong - I'm really not all that knowledgeable in these areas and I don't want to enable something that would actually make me more vulnerable. I found this (http://technet.microsoft.com/en-us/library/cc725769(WS.10).aspx), but now I have to find out how to add the IpRestrictionModule module. – fordareh Nov 20 '09 at 18:08
  • 2
    You're right fordareh. I fail. =| – Wesley Nov 20 '09 at 19:54