Thursday 24 November 2011

How to check open ports /sockets??

To check the open ports

netstat -an | grep -i listen
netstat -an | grep


To find out the files which is using particular protocol on ports

lsof -i :"port no"

Example : lsof -i :513

To find out the process which is using particular ports

lsof -nP -i "port no"

Example : lsof -nP -i tcp:2100

No comments:

Post a Comment