Super User is a question and answer site for computer enthusiasts and power users. 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 am writing a C# console application for Windows 7 that can send and listen to packets (client or server). Since I only have one computer, I will have to debug and test my code locally.

I first created a new rule in Windows Firewall with Advanced Security, given it a name "Foo" and enable a TCP port of "55000".

I then install telnet on my command prompt. I tried

open 127.0.0.1 55000
open localhost 55000
open 192.168.1.122 55000 // my local network IP

All return Could not open connection to the host, on port 55000: Connect failed.

share|improve this question
    
run netstat -ano and see if you see a listening port on port 7 – Mark S. Mar 1 '12 at 12:30
    
I ran netstat -ano and it seems port 55000 is not even there. But I had already enabled that port on firewall setting.. – KMC Mar 1 '12 at 12:37
1  
This may be dumb but is your C# console app running and accepting connections on 55000 when you try and telnet. – squarebear Mar 1 '12 at 12:42
    
I am not even using the application now. I simply open the port and try telneting it because it doesn't seem to be there at all.. – KMC Mar 1 '12 at 12:43
up vote 2 down vote accepted

Port 7 is for the echo protocol. Ports in the first 1024 numbers are reserved for well-known protocols. If you are doing development, you should use a port in the 49152–65535 range, according to http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers .

share|improve this answer
    
I repeat the same thing using port 55000 but still give me the exact same result – KMC Mar 1 '12 at 12:30
    
Did the netstat command posted by Mark Scrano show that your program is listening on the port? – kristianp Mar 1 '12 at 12:37
    
no, it's not even listed there on the result table. But I already add and enabled the port.. – KMC Mar 1 '12 at 12:38
    
isn't superuser part of stackexchange? – KMC Mar 1 '12 at 12:40
    
Yeah, sorry, I meant stackoverflow. – kristianp Mar 1 '12 at 12:45

You must log in to answer this question.

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