tcpdump

From Leechfinger
Revision as of 16:29, 10 May 2025 by Qais (talk | contribs)
Jump to navigationJump to search

Tcpdump prints out a description of the contents of packets on a network interface that match the boolean expression. Many flags need root permissions to run.

Install

# apt install tcpdump

Flags

Tcpdump flags
Flag Description
-D List all interfaces.
-i Interface, eth1, any.
-C Max file size to save, all files will have subsequent numbers.
-W Limit the limit the number of files, use with -C.
-w Output file name.
-r Read the output file.

List all interfaces

# tcpdump -D

Interface, file size, rotation, output file

# tcpdump -i eth0 -C300 -W4 -w $HOSTNAME-tcpdump.pcap
# tcpdump -r zykonB-tcpdump.pcap