使用Wireshark分析网络包的时候需要抓包,可以在服务器上安装Wireshark,不过觉得tcpdump挺方便的。
tcpdump -s 0 -U -n -w - -i eth0 not port 22 >/home/zhuhuihua/packet_capture
各个参数的表示的意义:
-i:指定网络接口
not port 22 表示不截取端口号为22的网络包
-s 设置抓取网络包的大小,0表示抓取完整的数据
可以参考:网络的基本功,tcpdump的使用技巧
使用Wireshark分析网络包的时候需要抓包,可以在服务器上安装Wireshark,不过觉得tcpdump挺方便的。
tcpdump -s 0 -U -n -w - -i eth0 not port 22 >/home/zhuhuihua/packet_capture
各个参数的表示的意义:
-i:指定网络接口
not port 22 表示不截取端口号为22的网络包
-s 设置抓取网络包的大小,0表示抓取完整的数据
可以参考:网络的基本功,tcpdump的使用技巧