Show HTTP GET requests tcpdump
Capture and print HTTP GET request lines
tcpdump -i any -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep 'GET /'
more tcpdump
all 18 commands →
Capture between two hosts
tcpdump -i eth0 'host 10.0.0.1 and host 10.0.0.2'
Verbose with packet content
tcpdump -i eth0 -vvv -A -s 0 port 5432
Limit capture count
tcpdump -i eth0 -c 100 -w capture.pcap
Capture only TCP SYN packets
tcpdump -nn 'tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn'
Capture SYN and FIN flags
tcpdump -nn 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0'