Check If a Port Is Open With Netstat

Configurare noua (How To)

Situatie

Solutie

Pasi de urmat

Select the Start menu and type “command.” Right-click on the Command Prompt app and select Run as administrator.

Screenshot of opening command prompt

Type netstat -ab and press Enter. You’ll see a long list of results, depending on what’s currently connecting to the network. You’ll see a list of running processes. The open port numbers will be after the last colon on the local IP address (the one on the left).

Screenshot of open ports using netstat

Look for the items on the list with a state of “LISTENING.” These are the processes that are communicating via one of the currently opened ports.

Screenshot of looking for listening ports

If you want to know the program’s name that has a specific port open, then type netstat -aon and press Enter. This command will show the protocol the app is using, the local and remote IP addresses, and most importantly, the PID of the application using that port (the number on the far right). Remember to look for the LISTENING status.

Screenshot of checking the PID of an application

To find the application related to that PID, right-click the task manager and select Task Manager. Select the Details tab. Look in the PID field for the PID you noted from the command prompt screen.

Screenshot of process PID in task manager

Tip solutie

Permanent

Voteaza

(4 din 11 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?