IIS7: How to restrict virtual directory access to specific IP

7,458

You need IIS module called "IP and Domain Restrictions" (bundled with IIS) .. or grab improved version: Dynamic IP Restrictions.

Once installed configure to block all IPs except selected (should be no problems at all -- very easy GUI).

Share:
7,458

Related videos on Youtube

marc esher
Author by

marc esher

Updated on September 18, 2022

Comments

  • marc esher
    marc esher almost 2 years

    I have a site set up in IIS, and I have a virtual directory that should only be available to localhost.

    In IIS6, this was trivial to set up.

    However, those property sheets are gone in IIS7 and I cannot find a corresponding setting. RequestFiltering and denyURLSequence isn't right, because that doesn't have an attribute for IP, at least, not that I could find.

    Thanks!

  • vcsjones
    vcsjones almost 13 years
    You would still have to make sure that the IP and Domain Restrictions module is installed in IIS for that to work.
  • marc esher
    marc esher almost 13 years
    Thanks sparx. I tried this, but it seemed as if IIS wasn't picking up on the existence of the file. In fact, I had changed several things in applicationHosts.config as well and those changes weren't noticed, either. I have feature delegation turned on (I think), so no idea what was going on.