欢迎来到天天文库
浏览记录
ID:10690098
大小:55.00 KB
页数:3页
时间:2018-07-07
《用bandwidthd进行网络流量的检测和分析》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、用Bandwidthd进行网络流量的检测和分析~教育资源库 在流量统计软件中有MRTG,NTOP,BANDRTG只是显示某一网络接口的总量,NTOP详细得来也很占系统资源。 但不知道大家用过bandVIPC(基本上Linux都有) RedHat9.0自带的rpm包也可以,要装有下面的包: gd-1.8.4-4 gd-devel-1.8.4-4 libpng-1.2.2-16 libpng-devel-1.2.2-16 libpcap-0.7.2-1 分别执行rpm-ivh软件包进安装即可.
2、2.下载: bande/中(这个目录是我的习惯而已). 2.1.也下载一个补丁吧,这个补丁可以增加检测端口的,所以在这里还是先补了再安装. 在相关补丁(patchs)的连接里有这样一个补丁: tracker/index.php?func=detailaid=918875group_id=89685atid=591013 下载bande/中 这是为bandailbandlbandlbandlbandlbandailbandwidthd-1.2.1b]#patch-p1<../bandwidthd
3、-cp3-1.2.1b.patchpatchingfilebandwidthd-0.4.kdevprjpatchingfilebandwidthd.cpatchingfilebandwidthd.hpatchingfileconf.lpatchingfileconf.y123下一页友情提醒:,特别!patchingfileetc/bandakeinstall显示:[rootmailbandakeinstallcc-I/usr/local/include-O3-entationandrepresentdefaul
4、ts#Substocollectstatisticson#sub10.0.0.0255.0.0.0#sub208.16.191.0255.255.255.0sub192.168.1.250255.255.255.0#以一网段为例#Devicetolistenondeveth0#(这是你要检测的网卡,可以调整为对应的网络连接设备)把其中sub的设定,以一网段为例:sub192.168.1.0255.255.255.0#################################################
5、###Optionsthatdon'tusuallygetchanged#Anintervalis2.5minutes,thisishoany#intervalstoskipbeforedoingagraphingrun#skip_intervals0#默间隔认2.5minutes刷新#Graphcutoffishoanykmustbetransferedbyan#ipbeforeiscuousmodetoscoretotraffic#thatmaynotberoutingthroughthehostm
6、achine.#promiscuoustrue#让网卡在混杂模式中记录#Logdatatocdffilehts/log.cdf在bandatfilterstringusedtocontrols#以ip为过滤对象filterip#DrawGrap上一页123下一页友情提醒:,特别!hsgraphtrue#以下是我打了补丁bandat:itemitem_namergb_colorprotocolports这是记录的格式:端口名字,RGB颜色,端口号#obs.:Theyello黄色预设为TOTAL的颜色itemTCP
7、0x00ff00tcpallitemHTTP0x0000fftcp80443itemFTP0xc0c0fftcp2021itemP2P0xff00fftcp1044104512144661466146655190550055015502550363466347666666677788888888892886428865itemUDP0x800000udpallitemICMP0xff0000icmpallitemSMTP0xFF8C00tcp25itemPOP30x00FFFFtcp110 其中SMTP和PO
8、P3是我为了更详细的数据流而增加上去的.你也可以增加你想检测的端口,这就是为何我推荐打这个补丁再安装的原因。存盘之后,便可执行。 5.运行,要先转到安装目录才能执行 cd/usr/local/bandp;Counter<NumIps;Counter++) 把21改成101 就变成TOP100 然后查找TOP20改为字符串TOP100 然后存盘,再makeinstall
此文档下载收益归作者所有