tldr/pages/common/tcpdump.md
Srinivasan R e4114fa6cc Normalize the final new line
Fixes #310
Some files had no newlines, some had 1 newline and some more than 1 newline.
Normalize them all to have only 1 newline at the end of all files.
2015-10-28 14:03:06 +05:30

607 B

tcpdump

Dump traffic on a network

  • capture the traffic of a specific interface

tcpdump -i {{eth0}}

  • capture all TCP traffic showing contents (ASCII) in console

tcpdump -A tcp

  • capture the traffic from or to a host

tcpdump host {{www.example.com}}

  • capture the traffic from a specific interface, source, destination and port

tcpdump -i {{eth0}} src {{192.168.1.1}} dest {{192.168.1.2}} and port 80

  • capture the traffic of a network

tcpdump net {{192.168.1.0/24}}

  • capture all traffic except traffic over port 22 and save to a dump file

tcpdump -w dumpfile.pcap not port 22