Network Connection Monitoring in Linux: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 17: | Line 17: | ||
View established connections and associated programs | View established connections and associated programs | ||
sudo netstat -atupen | grep ESTABLISHED | sudo netstat -atupen | grep ESTABLISHED | ||
netstat -nputw | |||
continuously updated | |||
netstat -nputwc | |||
View established connections and associated programs type TCP only | |||
sudo lsof -nP -iTCP -sTCP:ESTABLISHED |
Revision as of 12:32, 7 August 2021
ss list out all connections. ss -t tcp only. ss -u udp only. ss -x unix only. ss -a -A udp report both "CONNECTED" and "LISTENING" sockets udp ss -nt tcp with hostnames not resolved. ss -ltn listening sockets only, tcp with hostnames not resolved. ss -pnt tcp with hostnames not resolved, associated process id's using connection. <- very useful ss -s summary statistics netstat -natp show active Internet connections netstat -tupn tcpdump -X -i eth0
View established connections and associated programs
sudo netstat -atupen | grep ESTABLISHED netstat -nputw
continuously updated
netstat -nputwc
View established connections and associated programs type TCP only
sudo lsof -nP -iTCP -sTCP:ESTABLISHED