One minute
A quick peek into the network
Did you ever wonder why the lights on your network card (respectively your network switch) flickered although you didn’t do anything network based? There is a neat application called netstat
to answer this sort of questions. A simple netstat
will give the complete list of any connections established. Mostly this is not what you want. To see just the TCP connections (both IPv4 and IPv6), type netstat -p tcp
. This works analogously for UDP packets (there are several other supported protocols, but these should handle all the relevant traffic). Also you can specify the protocol family to see just IPv4 or IPv6 packets, by executing netstat -p tcp -f inet
or netstat -p tcp -f inet6
respectively. The colums are self-explanatory, so you should get along quite well in a couple of minutes. Just remember that UDP is a stateless protocol and therefore the last column is always empty.