
Complex Command Lines (cont)
Find those connections via netstat:
$ netstat -natp | head -3
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.200:22 216.293.217.155:27123 ESTABLISHED
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
$ netstat -natp 2>/dev/null | grep $myip:22
tcp 0 0 192.168.1.200:22 216.293.217.155:27123 ESTABLISHED
tcp 0 0 192.168.1.200:22 18.193.259.1:52211 ESTABLISHED
tcp 0 0 192.168.1.200:22 216.293.217.155:15928 ESTABLISHED
$ netstat -natp 2>/dev/null | grep $myip:22 | wc -l
3
Copyright 2005, Bri Hatch of Onsight, Inc.
Presented at LFNW - LinuxFest Northwest, Bellingham, Washington, Apr 2005
Presentation created using vim and MagicPoint.