I have an interesting problem right now. On a Windows Server 2012 R2 I have two IP addresses, say 192.0.2.1
and 192.0.2.2
. On one address e.g. 192.0.2.1
a web server runs on port 80
, which is implemented in C# using HttpListener
. At the other address e.g. 192.0.2.2
I try to open port 80
using a Go program and http.server{}
. The Go program receives an error message that the port cannot be opened. The C# program is started first. I start the Go program with administrator permissions.
When I use netstat
to check which ports are in use on which addresses, the second address 192.0.2.2
is completely unused. Port 80
is only opened by the C# program at the first address i.e. 192.0.2.1
.
It makes no sense at all. Am I missing something?
I had a similar scenario two weeks ago with Ubuntu and two Go programs, both using port 443
on different IP addresses. That was no problem at all and ran immediately.