0

I have several bindings for a particular website.

domain1.com   -  IP address1
domain2.com   -  IP address1
localhost     -  *

I would like the public to be able to access domain1.com

however, I would only like a specific IP address to be able to access domain2.com

I would like both bindings to access the same site.

Is this doable in IIS 7?

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
Brian Webster
  • 1,123
  • 1
  • 18
  • 39

1 Answers1

1

Quite doable, you can even do sub-folder level IP restrictions in IIS-7. You have to install the feature that allows this ("IP and Domain Restrictions"). It will show up in the IIS-7 view under the IIS section and will be called "IP and Domain Restrictions".

Edit: IIS7 doesn't allow what you want. Bound addresses and hostnames are properties of sites, and a site has a monolithic settings base. In order to do what you need, you need to create a new site and apply different restrictions. You can do this a couple of ways.

  • (supported) Completely duplicate the site directory structure in the other location.
  • (probably not supported) Use 'mklink' to create a symlink to the first site's directories. You may have issues with competing web.config files, though.
sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • I have that feature installed... how do I restrict just one of my bindings? Thanks for the help – Brian Webster Oct 05 '10 at 21:42
  • @hamlin11 If I'm reading you correctly, you have a single site that's answering up to multiple identities. To do this you'll need to create a different site (it can be rooted in the same directory) that answers to the other domain. – sysadmin1138 Oct 05 '10 at 21:46
  • @sysadmin1138, I did not know that you can have multiple sites rooted in the same directory. Thanks for the help – Brian Webster Oct 05 '10 at 21:58
  • @sysadmin1138, can you provide some insight here? Thanks http://serverfault.com/questions/187931/iis-7-multiple-iis-sites-pointed-at-same-directory-how-is-this-accomplished – Brian Webster Oct 05 '10 at 23:39
  • @hamlin11 Maniac has 90% of it. 'mklink' may help you here, but you'll still suffer the conflicting web.config file problem. – sysadmin1138 Oct 05 '10 at 23:46