Skip to content

Linux: Tcpdump

Marcos Aurélio Silvério edited this page Nov 15, 2021 · 3 revisions

Listen on all interfaces:

tcpdump -i any

Listen on all interfaces and do not resolve hostnames:

tcpdump -n -i any

Listen on a specific interface:

tcpdump -i eth0

Capture packets from a specific host:

tcpdump host <host_ip_address>

Capture packets from a specific port:

tcpdump port 443

Capture packets from a specific source address:

tcpdump src <source_host_address>

Capture packets from a specific destination address:

tcpdump dst <destination_host_address>

Filter by specific source and destination addresses:

tcpdump src <src_host_address> and dst <destination_host_address>

Clone this wiki locally