在baidu和google上找了N篇文章,都没有一篇是介绍怎么用iftop的-f参数,全部都是说“-f这个暂时还不太会用,过滤计算包用的”,最后,终于找到了使用方法,介绍如下:
iftop
accepts pcap-filter formatted filters on the commandline with the -f
flag. Below is a table of some of the filers you might want to use with iftop:
dst host host | src host host |
dst net net | src net net |
dst port port | src port port |
dst portrange start-end | src portrange start-end |
gateway gateway | |
ip proto protocol |
For example, to view only traffic going from your local machine to www.itkylin.com over eth0, you could run:
iftop -i eth0 -f “dst host www.itkylin.com”
Or to see only ssh traffic over wlan0:
iftop -i wlan0 -f “dst port 22″
其它的使用方法自己上baidu或google上找吧,此处不做重复介绍了!