Jump to content
Toggle menu
  • 51 articles
  • 24 files
  • 4 users
  • 750 edits
Tech-Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Tcpdump example with useful flags

From Tech-Wiki


Command and operational reference for Tcpdump example with useful flags.

Commands

tcpdump - Network packet capture (Sniffer)

# tcpdump -n -i eth0 net 10.1.1.0/24 and host 10.2.2.2 and port 80
# tcpdump -n -i eth0 'host 10.1.1.1 and  (port 80 or 443)'
# tcpdump -w - | tee capture.pcap | tcpdump -r -   (write to file and standard output the same time)
# tcpdump -s0 -C 100 -W 10 (full packet size, split files into 100MB, and circular buffer using 10 files)
# tcpdump -A -i any -vv (dump packets on screen in ASCII, handy for web traffic)

See also