Tuesday, December 7, 2010

netstat quick reference

Display all LISTENING tcp ports
# Netstat -ntlp

To swtich the name resolution off use
# netstat -tlp

Display all LISTENING udp ports
# netstat -ulp

To see established tcp connections
# netstat -tp

To find out who has connected through ssh
# netstat -ntp|grep :22
or
# netstat -tp|grep :ssh

Displaying the routing table
netstat -r
or
netstat -rn

0 comments: