Networking

Check open ports

netstat -tulpn | grep LISTEN
lsof -i -P -n | grep LISTEN

Show the whole routing table for the computer

netstat -r

Tcpdump

sudo tcpdump -i eth0 -w client-dump.cap

Get public IP address

ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'