ssh user@host "tcpdump -i eth0 -w - -U" | wireshark -k -i -
host 192.168.1.10
net 192.168.1.0/24
port 443
src host 10.0.0.5
dst port 22
tcp port 80 or tcp port 443
not broadcast and not multicast
host 10.0.0.5 and not port 22
ip.addr == 192.168.1.10
tcp.port != 80
frame.len > 1400
tcp.flags.syn==1 && tcp.flags.ack==0
http || dns
!(arp || icmp)
http.host contains "example"
frame matches "(?i)password"
| Category | Filter | Shows |
|---|---|---|
| HTTP | http.request | Only HTTP request packets |
| HTTP | http.response.code >= 400 | HTTP error responses (4xx/5xx) |
| HTTP | http.authorization | Basic/other auth headers — cleartext creds if not HTTPS |
| DNS | dns.flags.response == 0 | DNS queries only |
| DNS | dns.flags.rcode != 0 | Failed DNS lookups (NXDOMAIN, SERVFAIL, etc.) |
| TLS | tls.handshake.type == 1 | Client Hello (SNI, offered ciphers) |
| TLS | tls.handshake.type == 2 | Server Hello (chosen cipher/version) |
| TLS | tls.handshake.extensions_server_name | Packets carrying an SNI hostname |
| TCP health | tcp.analysis.retransmission | Retransmitted segments — packet loss upstream |
| TCP health | tcp.analysis.duplicate_ack | Duplicate ACKs — early sign of loss/reordering |
| TCP health | tcp.analysis.zero_window | Receiver's buffer is full — sender must pause |
| TCP health | tcp.analysis.out_of_order | Segments arriving out of sequence |
| TCP | tcp.flags.syn==1 && tcp.flags.ack==0 | New connection attempts (SYN only) |
| TCP | tcp.flags.reset==1 | Connection resets (RST) |
| Layer 2/3 | arp | All ARP traffic |
| Layer 2/3 | eth.dst == ff:ff:ff:ff:ff:ff | Broadcast frames |
| Layer 2/3 | vlan.id == 20 | Traffic tagged with VLAN 20 |
| Layer 2/3 | icmp | Ping and ICMP error messages |
| Conversation | ip.addr==10.0.0.5 && ip.addr==10.0.0.9 | Only traffic between these two hosts |
| Noise reduction | !(arp or icmp or dns) | Hide chatty background protocols to see what's left |
| Content search | frame contains "password" | Any packet with that literal byte string anywhere |
| FTP | ftp.request.command=="USER" || ftp.request.command=="PASS" | Cleartext FTP credentials |
| Quality | expert.severity == "error" | Everything Wireshark's expert analyzer flagged as an error |
| Size | frame.len > 1400 | Large frames — useful when chasing fragmentation/MTU issues |
tcp.stream == 4
tcp.options.wscale.shift
tshark -D
tshark -i eth0 -w capture.pcapng
tshark -i eth0 -f "port 443" -c 500
tshark -r capture.pcapng -Y "http.request"
tshark -r capture.pcapng -T fields \
-e ip.src -e ip.dst -e tcp.port \
-E separator=,
tshark -r capture.pcapng -z conv,ip -q
editcap -c 100000 big.pcapng split.pcapng
mergecap -w merged.pcapng file1.pcapng file2.pcapng
export SSLKEYLOGFILE=~/tls-keys.log
tcp.flags.syn==1 && tcp.flags.ack==0
arp
http.authorization or ftp.request.command=="PASS" or telnet
mergecap -w merged.pcapng a.pcapng b.pcapng
| Symptom | Likely Cause / Fix |
|---|---|
| No interfaces listed | missing capture permissions — Npcap not installed (Windows) or user not in the pcap/wireshark group (Linux) |
| Capture filter throws a syntax error | using display-filter syntax (ip.addr==) in the capture filter field — capture filters need BPF syntax (host) |
| App "feels slow" but no obvious errors | check Analyze → Expert Information for retransmissions/dup ACKs first |
| Can't see decrypted TLS despite keylog set | keylog file must have been populated while that specific session was captured, and the Preferences path must point at it before opening the file |
| Dropped packets during a busy capture | increase the buffer size in Capture Options, or capture at a mirror/TAP instead of an oversubscribed host NIC |
| "Bad checksum" flooding the packet list | usually NIC checksum offload on the sending host — disable checksum validation in Preferences → Protocols → TCP/IP/UDP |
| Action | Risk |
|---|---|
| Capturing on a shared/production interface | caution can add load; prefer a mirror/SPAN port over the live host NIC where possible |
| Capturing traffic you're not authorized to see | unlawful get explicit authorization first — see Security & Forensics above |
| Exporting objects from decrypted TLS traffic | caution may contain sensitive data — handle the pcap like any other confidential artifact |
| Long unattended captures without a ring buffer | caution can fill disk on a busy link — always cap size/count |
| Display filters | safe non-destructive — they only hide packets, never discard them from the file |
| tshark -z / -T fields extraction | safe read-only analysis of an already-saved capture |