[Operation and Maintenance] Use tcpdump to capture packets (continuous update)

installation

Install tcpdumpcapture tool

sudo apt install tcpdump

Command parameters

Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ]
                [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]
                [ -i interface ] [ -j tstamptype ] [ -M secret ] [ --number ]
                [ -Q in|out|inout ]
                [ -r file ] [ -s snaplen ] [ --time-stamp-precision precision ]
                [ --immediate-mode ] [ -T type ] [ --version ] [ -V file ]
                [ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z postrotate-command ]
                [ -Z user ] [ expression ]

Common commands

  1. Capture the ethXpacket received by the network port
tcpdump -i ethX

Guess you like

Origin blog.csdn.net/macaiyun0629/article/details/108762879