Computer Ports – Helpful Commands

Telnet

telnet 127.0.0.1 8080

ping xxx.xxx.xxx.xxx:8080

If the window hangs while saying “Connecting …” and then goes away, the port is not accessible. If the window instantly goes away, the port is probably not accessible. If the window display text, like “220 ESMTP spoken here” or just shows an empty window the port is open.

 

To find open ports on a computer, use netstat command line.

To display all open ports, open DOS command, type netstat and press Enter.

To list all listening ports, use netstat -an |find /i “listening” command.

 

To see what ports are in computer actually communicates with, use netstat -an |find /i “established” command.

To find specified open port, use find switch. For example, to find if the port 3389 is open or not, do netstat -an |find /i “3389” command.

 

The Netstat.exe utility has a new switch, the -o switch, that an be used to determine which process identifier (ID) (program) listens on a given port. For example, the netstat -ano command can produce the following output: