Library
Networkingbeginner3 min readNov 24, 2026

Capturing Traffic with tcpdump

Minimal, safe packet capture for diagnosing connection failures without drowning in output.

Scope the filter

Always filter at capture time:

sudo tcpdump -ni eth0 -c 200 'host 10.0.0.5 and port 443'

Unfiltered captures fill disks and slow analysis.

Read the handshake

SYN without SYN-ACK means the path or listener is broken. RST immediately after SYN means something is rejecting. Repeated retransmissions indicate loss or MTU trouble.

Write to file for real analysis

sudo tcpdump -ni any -w /tmp/cap.pcap 'port 1883'

Open it in Wireshark for stream reassembly and timing graphs. Text output is for orientation only.

Mind permissions and privacy

Captures contain payloads. Store them with restrictive modes and delete when done. TLS hides content but not metadata — SNI, timing and volume still leak.