{"id":937,"date":"2008-12-10T17:33:25","date_gmt":"1999-01-01T00:00:00","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/?p=937"},"modified":"2021-07-27T16:58:52","modified_gmt":"2021-07-27T16:58:52","slug":"unix-tcpdump-2","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/os\/unix\/general-unix\/unix-tcpdump-2.html","title":{"rendered":"A Look into Tcpdump"},"content":{"rendered":"

Tcpdump is a packet capture for the Linux command line. This is by no means a full guide but a quick overview of some of the main commands.<\/p>\n

The syntax below will capture all traffic with IP address of 172.16.1.1 and and IP in the network 172.16.1.0\/24 with a port of udp\/53. This will write it to a capture file for viewing in wireshark, with double verbosity.<\/p>\n

tcpdump -vvi eth2 -s 1500 -w test.cap host 172.16.1.1 and net 172.16.1.0\/24 and udp port 53<\/pre>\n

This will read the capture test.cap<\/p>\n

tcpdump -r test.cap<\/p>\n

To view the payload of the packet use the following commands :<\/p>\n