Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working in Windows Server 2008.

I have a very basic C# forms application (not a service) that is listening on a port, say 56112. When using telnet I can connect from the localhost and send and receive data. For some reason I cannot remotely connect to the application. I know I have a connection because I can telnet to 23 on the remotely fine.

I've opened this port on the firewall, created rules in/out in advanced firewall, disabled the firewall completely, and more.

Any suggestions would be great!

This is the telnet output:

Microsoft Telnet> open 56112
Connecting not open connection to the host, on port
56112: Connect failed

The nmap output indicates that the port isn't even open?! I've created the rules for in on Windows Firewall (+ advanced firewall) and still cannot see those changes remotely.

Starting Nmap 5.21 ( ) at 2010-04-17 14:04 Pacific Daylight Time
Nmap scan report for
Host is up (0.0017s latency).
Not shown: 89 closed ports
80/tcp    open  http
135/tcp   open  msrpc
139/tcp   open  netbios-ssn
445/tcp   open  microsoft-ds
5357/tcp  open  unknown
49152/tcp open  unknown
49153/tcp open  unknown
49154/tcp open  unknown
49155/tcp open  unknown
49156/tcp open  unknown
49157/tcp open  unknown
share|improve this question

Time to drag out the network debugging tools:

  • What does nmap say if you probe the port from the remote system?
  • What does the interaction look like if you capture the data using wireshark when you try to connect? Do you get an RST?
share|improve this answer
nmap indicated that the port isn't even open, even though I have modified the firewall. – gnucom Apr 17 '10 at 22:05
up vote 1 down vote accepted

I'm not a networking whiz so tell me if this is elementary:

Based off the patterns I saw from the output of netstat -an I changed
serverSocket = new TcpListener(IPAddress.Parse(""), port);
serverSocket = new TcpListener(IPAddress.Parse(""), port);

Also used nmap which was very helpful, but didn't report the port opened while I was using localhost's IP as the server. Once I made the host change I noticed that nmap also reported the port as opened, pretty strange in my opinion.

share|improve this answer
Makes sense. If you bind to a specific IP address the application will only answer to that IP. If you bind to you actually bind to all local addresses. – pehrs Apr 18 '10 at 6:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.