Aug 31 2007

IP address binding with IIS

Tag: IIS, Web serversGrantus Maximus @ 7:10 am

This little trick has saved my life with quite a number of times!! But took me a while to find, so here I am sharing…

Lets say you’ve already got IIS running on your 2003 server, but you want to install several other web servers (or just one.. Hehe). You’ve already assigned a number of additional IP addresses to your server under network adapters TCP/IP settings.

But you then notice IIS is listening on all IP address! Despite having configured you’re sites in Internet Information Services (IIS) Manager to only use one IP address. You can see this using netstat.exe!

Solution

  1. Install Microsoft Windows support tools. Found on your Windows Server 2003 CD at \support\tools\suptools.msi
  2. Stop IIS listening on all addresses “httpcfg delete iplisten -i 0.0.0.0
  3. Set IIS to listen on a specific address “httpcfg set iplisten -i 192.168.x.x
  4. Stop IIS “net stop http /y
  5. Start IIS “net start w3svc

Confirmation

Now to confirm what you’ve just done you can run “httpcfg query iplisten“.