Thursday, October 11, 2012

Find list of open ports / listening ports


lsof

Samples 
 # lsof -i -n -P

netstat

Samples
# netstat -tulpn
# netstat -a | egrep 'Proto|LISTEN'
# netstat -ao

Important netstat arguments
-n, --numeric           don't resolve names - this one really saves time ;)
-e, --extend            display other/more information
-p, --programs          display PID/Program name for sockets
-l, --listening         display listening server sockets
-t, --tcp   tcp
-u, --udp   udp
-a, --all, --listening  display all sockets (default: connected)
-c, --continuous        continuous listing 

No comments:

Post a Comment

I would be glad to know if this post helped you.