Here's an example of netstat
output:
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 burningbird.http a25253.upc-a.che.3617 TIME_WAIT
tcp4 0 0 burningbird.http pm66.internetsee.4301 TIME_WAIT
tcp4 0 0 burningbird.http strider.ccs.neu..4492 TIME_WAIT
tcp4 0 0 burningbird.http strider.ccs.neu..4491 TIME_WAIT
tcp4 0 0 burningbird.http strider.ccs.neu..4490 TIME_WAIT
tcp4 0 0 burningbird.http mailgate.ltsbfou.57600 FIN_WAIT_2
tcp4 0 0 burningbird.http mailgate.ltsbfou.57595 FIN_WAIT_2
tcp4 0 20 burningbird.ssh adsl-64-168-24-1.1076 ESTABLISHED
tcp4 0 0 burningbird.submission *.* LISTEN
tcp4 0 0 burningbird.smtp *.* LISTEN
tcp4 0 0 burningbird.domain *.* LISTEN
tcp4 0 0 burningbird.http *.* LISTEN
tcp4 0 0 burningbird.https *.* LISTEN
tcp4 0 0 burningbird.pop3s *.* LISTEN
tcp4 0 0 burningbird.ssh *.* LISTEN
udp4 0 0 burningbird.domain *.*
udp4 0 0 burningbird.syslog *.*
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
e5ed4cc0 stream 0 0 e5f0cbc0 0 0 0 /tmp/mysql.sock
e5ed4d40 stream 0 0 0 0 0 0
e5e08380 dgram 0 0 0 e5ed4dc0 0 e5e083c0
e5e083c0 dgram 0 0 0 e5ed4dc0 0 e5ed4d80
e5ed4d80 dgram 0 0 0 e5ed4dc0 0 0
e5ed4dc0 dgram 0 0 e556c040 0 e5e08380 0 /var/run/log
Specifying netstat with the command line option
-s provides a detailed report of
per-protocol -- TCP, UDP, IP, and so on -- usage statistics.
The netstat program is helpful not only for
determining if someone is trying to break into your system, but also
for determining if your system is having basic communication
problems.