Trace Port and PID using netstat command

Using netstat command instead of telnet and to get more information

TRACK THE NAME OF THE APPLICATION BY PORT:

>netstat -ano | findstr "443"

>tasklist | findstr "7736"

KILL THE PROCESS USING PID:

>taskkill /PID <PID> /F

Note: Run the command with the elevated privileges

TRACK THE PORT BY APPLICATION NAME

Check the application name in the resource monitor:

Right click task bar  -  Click Task Manager  - -  Performance Tab  -  Open resource Monitor (You can check the application image name running in the machine).

>tasklist /fi "imagename eq firefox.exe"

>netstat -ano | findstr "7736"

TRACK THE PORT STATUS IN THE MACHINE:

>netstat -ano 1 | findstr "445"

Use the “1” switch to try every one second in the mentioned port

  • ESTABLISHED means it has an established connection. (Port is enabled)
  • SYN_SENT means it is actively attempting to establish a connection. (Port is disabled).
  • LISTENING means that a service is listening for connections on that port. Once a connection is established it will be ESTABLISHED. . (Port is enabled but no app is running).

Comments