Capture DNS queries
Monitor all DNS lookups on any interface
tcpdump -i any -n port 53
- tool
- tcpdump18 commands
More tcpdump commands
-
tcpdump -i any -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep 'GET /'Capture and print HTTP GET request lines
-
tcpdump -i eth0 'host 10.0.0.1 and host 10.0.0.2'BPF filter: traffic between exactly two endpoints
-
tcpdump -i eth0 -vvv -A -s 0 port 5432Full verbose output with ASCII packet content for PostgreSQL
-
tcpdump -i eth0 -c 100 -w capture.pcapStop after capturing 100 packets
-
tcpdump -nn 'tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn'Catch only connection-initiating SYNs (no SYN-ACK) to spot scans or backlog floods