CY.I · CySA+ CS0-004 practice question
An analyst needs to capture all live traffic on interface `eth0` involving host `192.168.50.10` on TCP port 443 and write the raw packets to `capture.pcap` without resolving hostnames or port names. Which `tcpdump` command is correct?
Check answer and explanation
Correct answer: tcpdump -i eth0 -nn host 192.168.50.10 and tcp port 443 -w capture.pcap
Explanation
`-i eth0` selects the interface, `-nn` disables both hostname and port-name resolution, `host 192.168.50.10 and tcp port 443` is valid BPF syntax, and `-w capture.pcap` writes raw packets to disk.
Common trap
`-i eth0` selects the interface, `-nn` disables both hostname and port-name resolution, `host 192.168.50.10 and tcp port 443` is valid BPF syntax, and `-w capture.pcap` writes raw packets to disk.
Source: Original unofficial practice; not an official CompTIA exam item
Checked against the cited text on 2026-11-30.