Read PCAP file

Replay and display packets from a saved PCAP file

tcpdump -r /tmp/capture.pcap -n | head -50

tool
tcpdump18 commands
tags
tcpdumpnetworklinux

More tcpdump commands

  • tcpdump -i any host 10.0.0.5 -n

    Capture only traffic to/from a specific IP

  • tcpdump -i eth0 port 443 -n

    Capture HTTPS traffic only

  • tcpdump -i any -n port 53

    Monitor all DNS lookups on any interface

  • 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

all 18 tcpdump commands