Hi,
While i was working on my project, i found a problem that HttpChannel class doesn't take IP from 'bindTo' property well. HttpChannel internally uses HttpListener. so i wrote simple test application like below:
static void Main(string[] args)
{
HttpListener listener = new HttpListener();
listener.Start();
Console.WriteLine("Press return to quit...");
Console.ReadLine();
listener.Stop();
}
I expect it opens 9999 port with specified IP binding, 127.0.0.1. but netstat -anp | grep :9999 show the following result:
root@test-vm:~/mono-2.10.8.1# netstat -anp | grep :9999
Of course, MS .NET runtime lib works as expected:
C:\Users\yeonwoon>netstat -an | findstr :9999
As you might know, this could be a potential vulnerability in term of network security. If someone opens port on their machine with multiple network interfaces combined with public/private IPs, even the person restricted biding for private network on purpose, mono runtime doesn't bind IP address as expected. As a result, the port is available on public network as well.
--
Yeonwoon