关于linux:tcpdump

11次阅读

共计 371 个字符,预计需要花费 1 分钟才能阅读完成。

tcpdump

tcpdump [options] [not] protrol dir type

=====

-i: 网络接口
-c: 打印输出的行数
-e:输入的每行中都将包含数据链路层头部信息,例如源 MAC 和指标 MAC
-nn: hostname 转换为 ip 地址
-vvv:产生比 -vv 更具体的输入

=====
protrol: tcp udp icmp arp ip

=====
dir: src ,dst ,src and dst, src or dst(默认)

=====
type: host, net, port, portrange

例如:网卡为 ens33,tcp 协定
固定 IP
tcpdump -nn -c 10 -i ens33 tcp and src 192.168.250.1 and dst port 22

具体网段
tcpdump -nn -c 10 -i ens33 tcp and src net 192.168.250 and dst port 22

正文完
 0