tcpdump 常用例子

要从指定网卡中捕获数据包,运行:
tcpdump -i eth0
使用 -w 选项将所有捕获的包写入文件:
tcpdump -i eth1 -w packets_file
使用下面命令从之前创建的 tcpdump 文件中读取内容:
tcpdump -r packets_file
要获取整个网络的数据包,在终端执行下面命令:
 tcpdump net 192.168.1.0/24

https://www.linuxprobe.com/linux-tcpdump-example.html

你可能感兴趣的:(tcpdump 常用例子)