What’s listening on my ports in Windows?

Sometimes it is good to know what is running on your machine - or if something is actually listening when you are trying to connect to that pesky server you thought you had running.

The command you want to run is:

netstat –anop TCP | find “LISTEN”

Netstat is a program that shows all open network ports on your computer. For a better explanation of the flags used, check the documentation here. In this example, we are filtering for TCP ports (there are other options). Using find to filter the information helps because we are not looking for outbound or active connections right now, just things that are listening for connections.

Once you run the command, you will see a list of all ports which have a process listening on them. The second and last columns are where the goodies are.

Starting with the second column, ignore the IP address (left of the colon) and just look things after the colon - they’re the ports. To work out which process is listening, look at the last column for the Process ID and use task manager to find it.

The example below shows me listing all services listening on the TCP protocol on my machine, then checking which process is listening on port 443 (PID 3384).



#networking #services #windows #Work