Thursday, July 16, 2026

tshark and tcpdump cheatsheet

tshark

tshark -i "Wi-Fi" -B 8192 -q -b duration:3600 -b files:1440 --compress gzip -w d:\captures\out.pcapng "(host 8.8.8.8 and port 443) or (host 8.8.8.8 and port 53)"

tcpdump

tcpdump -i eth0 -s 0 -nn -B 8192 -G 3600 -W 1440 -w captures/out-%Y%m%d-%H%M%S.pcap "(host 8.8.8.8 and port 443) or (host 8.8.8.8 and port 53)"