Network Troubleshooting

On a Linux server with no GUI, an engineer must capture only HTTPS traffic to or from 10.1.1.20 on eth0 and save it for later analysis in Wireshark. Which command does this?

Show the answer

Correct answerC. tcpdump -i eth0 -w capture.pcap host 10.1.1.20 and port 443

AWhy not this: The or operator also captures every packet to or from the host and all port 443 traffic from others.

BWhy not this: It writes a file correctly, but port 80 is HTTP, not HTTPS.

CWhy this is right: It writes to a pcap file, and the filter requires both the host and port 443, so only that host's HTTPS is saved.

DWhy not this: The -r option reads an existing capture file instead of writing a new one, so nothing is saved.

-w writes packets to a pcap file that Wireshark opens, and the filter host 10.1.1.20 and port 443 limits the capture to HTTPS for that host. Using or instead of and also captures all other traffic to or from that host and all port 443 traffic from other hosts.