Linux之tcpdump用法汇总整理

来源:互联网 发布:阿莫达非尼 淘宝 编辑:程序博客网 时间:2024/06/06 02:54

## tcpdump用法汇总

 

tcpdump -n -i eth0 host 192.168.31.147 and 114.114.114.114

截取本机192.168.31.147和主机114.114.114.114之间的通信数据

 

tcpdump -n -i eth0 dst 192.168.31.147
tcpdump -n -i eth0 dst 192.168.31.147  or  192.168.31.157

截取所有进入本机的数据(或多个IP)

 

tcpdump -n -i eth0 dst 192.168.31.147 or 192.168.31.157 and tcp

抓取进入本机的所有tcp数据包

 

tcpdump -n -i eth0 src 192.168.31.147 or 192.168.31.157
tcpdump -n -i eth0 src 192.168.31.147 and port ! 22 and tcp

抓取从本机发出的数据包
and or进行条件赛选(端口)

 

tcpdump host 192.168.1.142 

截获主机所有的收发的数据

 

 

 

 

 

 

 

 

 

 

 

 

 


0 0
原创粉丝点击