1

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 server.cc 56112
Connecting server.cc...Could 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 ( http://nmap.org ) at 2010-04-17 14:04 Pacific Daylight Time
Nmap scan report for 192.168.56.101
Host is up (0.0017s latency).
Not shown: 89 closed ports
PORT      STATE SERVICE
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

2 Answers 2

1

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?
1
  • nmap indicated that the port isn't even open, even though I have modified the firewall.
    – gnucom
    Apr 17, 2010 at 22:05
1

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("127.0.0.1"), port);
To
serverSocket = new TcpListener(IPAddress.Parse("0.0.0.0"), 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.

1
  • Makes sense. If you bind to a specific IP address the application will only answer to that IP. If you bind to 0.0.0.0 you actually bind to all local addresses.
    – pehrs
    Apr 18, 2010 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .