tcpdump学习

#直接启动tcpdump将监视第一个网络接口上所有流过的数据包 -n不解析地址到name
tcpdump -n

#监视指定网络接口的数据包,不指定则为 eth0
tcpdump -i eth1

#监视指定host
tcpdump -n host 210.27.48.1
tcpdump -n host wecar.qq.com

#打印helios 与 hot 或者与 ace 之间通信的数据包
tcpdump -n host helios and ( hot or ace )
tcpdump host 210.27.48.1 and (210.27.48.2 or 210.27.48.3 )
tcpdump ip host ace and not helios
tcpdump ip host 210.27.48.1 and ! 210.27.48.2

#截获主机hostname发送的所有数据
tcpdump -i eth0 src host hostname

#监视所有送到主机hostname的数据包
tcpdump -i eth0 dst host hostname

#主机210.27.48.1接收或发出的telnet包
tcpdump tcp port 23 and host 210.27.48.1


#列出可是用的网卡接口
tcpdump -D

原文地址:https://www.cnblogs.com/siqi/p/4419429.html