These examples use eth0 and 192.0.2.20 as placeholders. Replace both. Capturing observes traffic and consumes resources. It does not edit firewall rules or persistent network configuration, but tcpdump can temporarily request promiscuous mode on the selected interface. Use -p when promiscuous capture is unnecessary. Capture only traffic you are authorized to inspect, because payloads and application metadata may be sensitive.
Start with a bounded capture #
Start with a bounded capture
Network tools · Local shell; platform and privileges as described below
tcpdump -DOutput may contain sensitive operational data.Replace these example values: eth0, 192.0.2.20.
sudo tcpdump -ni eth0 -c 100 'host 192.0.2.20'Press Ctrl+C when finished; a packet-count limit is not a time limit.
Output may contain sensitive operational data.Replace these example values: eth0, 192.0.2.20.
sudo tcpdump -ni eth0 -c 100 'host 192.0.2.20 and tcp port 443'Press Ctrl+C when finished; a packet-count limit is not a time limit.
Output may contain sensitive operational data.The first command lists capture interfaces. Numeric output avoids name and service lookups. The packet count stops the capture after 100 matching packets; on a quiet link it can still wait indefinitely, so use Ctrl-C when the test finishes. Confirm the selected interface actually carries the flow before interpreting an empty result.
Filters by question #
| Question | Capture expression |
|---|---|
| Either direction for one IPv4 host | host 192.0.2.20 |
| Requests from that host | src host 192.0.2.20 |
| Traffic involving a subnet | net 192.0.2.0/24 |
| Conventional DNS over UDP or TCP | port 53 |
| HTTPS over TCP or QUIC's usual UDP port | port 443 |
| Either of two application ports | tcp and (port 443 or port 8443) |
| ICMP for IPv4 or IPv6 | icmp or icmp6 |
| One IPv6 host | ip6 and host 2001:db8::20 |
Quote the expression so the shell does not interpret parentheses. DNS over HTTPS will not appear in a port-53 capture. A port number identifies candidate traffic, not proof of the application inside it.
Save evidence for Wireshark #
Save evidence for Wireshark
Network tools · Local shell; platform and privileges as described below
Replace these example values: eth0, case.pcap, 192.0.2.20.
sudo tcpdump -ni eth0 -s 0 -c 1000 -w case.pcap 'host 192.0.2.20'Press Ctrl+C when finished; a packet-count limit is not a time limit.
Output may contain sensitive operational data.Replace these example values: case.pcap.
tcpdump -nn -r case.pcap 'tcp port 443'Output may contain sensitive operational data.The first command writes a capture file; the second reads and filters it. A saved capture can be inspected repeatedly without reproducing the incident. Record the test time, interface, source, destination and expected path alongside the file.
Interpret without overclaiming #
An outbound request with no visible reply narrows the fault but does not identify the dropping device. Asymmetric routing, the wrong capture interface or an incomplete mirror session can hide replies. Collect a second capture nearer the destination when needed. Check tcpdump's dropped-packet summary before treating the trace as complete. Finally, confirm the real application succeeds; seeing a handshake alone is not an end-to-end test.
Sources
Documentation reviewed: 8 October 2026