How to find open ports with the netstat command

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

  1. To display all open ports, open DOS command, type netstat and press Enter.
  2. To list all listening ports, use netstat -an |find /i “listening” command.
  3. To see what ports your computer actually communicates with, use netstat -an |find /i “established”
  4. 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”.
  5. You can use PULIST from the Windows Resource Kit to find which process is using a specified port. For example, pulist |find /i “4125” may display

Process    PID     User
mad.exe   4125   Chicagotech/blin

Or you can use tasklist to find PID.