Petri

Quickly Find Local Open Ports

Usually, if you want to see all the used and listening ports on your computer, you’d use the NETSTAT command.

Note: The NETSTAT command will show you whatever ports are open or in use, but it is NOT a port scanning tool! If you want to have your computer scanned for open ports see this page instead (link will follow shortly).

Sponsored

Open Command Prompt and type:

You can redirect it to a text file by adding >c:’openports.txt to the command, if you want to:

netstat -an |find /i “listening” > c:’openports.txt

You can also change “listening” to “established” to see what ports your computer actually communicates with:

Note: In Windows XP and Windows Server 2003, you can type NETSTAT -O to get a list of all the owning process ID associated with each connection:

You can use PULIST from the W2K Resource Kit (Download Free Windows 2000 Resource Kit Tools) to find the PID and see what process uses it and who started it. For example, you found out that your computer had an open connection to a remote IP address on TCP port 80, and you don’t have any Internet Explorer or other browser windows open. You want to find out what process is using that session.

You can then use PULIST with the FIND command:

In this case, LUCOMS~1.EXE is run by DANIELP (myself) and as it happens, it’s the Symantec Live Update process.

Sponsored

You can also look in Task Manager for the respective PID.

  1. To set up Task Manager to show the PID column open Task Manager by using CTRL+SHIFT+ESC.
  2. Go to the Processes tab, click View and then Select Columns.

  1. In the Select Columns windows click to select PID and then click Ok.

  1. You can sort the PID column to display the PIDs in descending or ascending order.

Sponsored

To see all open, established, closing and other used ports type:

Again, in XP/2003 you can use the -O switch:

Sponsored

Join The Conversation

Sponsors

Sponsors