Stop IIS Binding to all IP Addresses

On a number of occasions I have tried setting up a piece of software with a web interface that listens on port 80 to avoid having to type the port number in the address bar and allowing me to set up a simple, descriptive name in my DNS server (e.g. typing backup takes me to my backup software’s web interface). Now, I understand that only a single process can listen on a specific port at a time and thus often add additional IP addresses to my servers. The problem comes when IIS (Internet Information Services) is also installed on the same machine.

IIS has a habit (by design) of binding to all IP addresses on the machine, even if they are not being used for a website. This is a common enough problem that Microsoft have a knowledge base article describing this exact issue with a workaround. So, without further ado, here are the steps required to set IIS to only listen on the IP addresses you define;

  1. Open a command prompt
  2. Run the following command replacing the xxx.xxx.xxx.xxx with the IP address you would like IIS to listen on
    netsh http add iplisten xxx.xxx.xxx.xxx
  3. If the IP address is added successfully, you will get a message saying “IP address successfully added”.
  4. All done! To check what addresses are being listened on, you can run the following command;
    netsh http show iplisten

Leave a Reply

Your email address will not be published. Required fields are marked *