Capture on an interface

Capture all traffic on eth0 without resolving names

tcpdump -i eth0 -n

tool
tcpdump18 commands
tags
tcpdumpnetworklinux

More tcpdump commands

  • tcpdump -i eth0 -w /tmp/capture.pcap

    Save raw packets to a PCAP file to open later in Wireshark

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

    Print packets from a saved PCAP file

  • tcpdump -i any host 10.0.0.5 -n

    Capture only traffic to and from one IP address

  • tcpdump -i eth0 port 443 -n

    Capture only HTTPS traffic on port 443

  • tcpdump -i any -n port 53

    Watch all DNS lookups on all interfaces

all 18 tcpdump commands