tcpdump

tcpdump

filter based on host:

tcpdump host <hostname/ip>

filter by interface:

tcpdump -i eth0 ...

more information:

tcpdump -v / -vv / -vvv

save to a file:

tcpdump -s0 -w filename.pcap
# -s0 cap as much data as possible

options

filters

writing to a file

tcpdump port 80 -w capture_file