Announcements and Chatter
Second IP Address Not Binding to IIS
Gravatar is a globally recognized avatar based on your email address. Second IP Address Not Binding to IIS
  Harvey Mushman
  All
  Aug 23, 2023 @ 06:38am

A few weeks ago I purchased a new computer (Intel NUC-11 $200) to use as a server for applications that support various home technologies. These include audio playback devices (Barix.com Exstreamer) throughout 7-8 locations (bed room, living room, pool, patio, etc). And in the process of developing my application realized I could create my own home grown Ring or Nest doorbell application using a Barix Annuncicom device.

Everything was going great, Node.js was serving the client pages to clear up the CORS issues I was having when I tried to connect directly to the Barix devices. But as I continued to develop code to interface to the doorbell, I realized that I needed a production site for working code vs. a development site... my family wanted to control the music without me stopping the audio interface. So I added a second IP Address to the NIC card and introduced two days of debugging - WHY and WHERE did I go wrong?

It turns out that adding the second IP address to the NIC card had a couple of unexpected issues. The Windows Firewall did not allow PING to respond. Fixing this was easy to find, turn off the firewall and it started working and changing the printer sharing rule from disable to enabled fixed the Firewall after it was restarted. But the harder problem to find was binding the new IP address to the NIC card (or at least as I now understand it, that was the underlying problem).

I read an online post that talked about netsh and when I entered the following in the command window,

c:\> netsh http show iplisten

the problem became obvious... although the Network setting allowed me to add a second IP address, it did not bind it to the NIC card. I have no clue why not but the solution was to issue the following:

c:\> netsh http add iplisten ipaddress=192.168.1.179

voila!

That fixed the problem and now IIS responds to both sites from my local machine during development and from any other machines on my LAN.

Hopes this posts help anyone else that ever runs into the same problem, but I still wonder why this happened in the first place.

Gravatar is a globally recognized avatar based on your email address. re: Second IP Address Not Binding to IIS
  Rick Strahl
  Harvey Mushman
  Aug 23, 2023 @ 08:39am

IIS uses http.sys and each port and IP address that IIS uses has to be configured to allow remote access. Also if you're not using port 80 or 443 the Firewall has to be explicitly opened up.

I have an old post that talks about using IIS Express (same applies for IIS if you use it local with non-80/443 ports):

Talks about the netsh commands to register the IP Address, the firewall issues...

+++ Rick ---

© 1996-2024