Fprobe通过libpcap监听数据并输出NetFlow格式到分析端,极大方便网络管理及监控。
所需组件安装:
1 | yum install libpcap-devel |
Fprobe安装:
1 2 3 4 5 6 | wget http: //sourceforge .net /projects/fprobe/files/fprobe/1 .1 /fprobe-1 .1. tar .bz2 tar jxvf fprobe-1.1. tar .bz2 cd fprobe-1.1/ . /configure make make install |
Fprobe监听eth0数据并输出NetFlow到127.0.0.1:9995:
1 | fprobe -i eth0 127.0.0.1:9995 |
NetFlow分析端可使用Nfsen,测试下是否有Netflow数据输出:
1 2 3 4 5 6 7 8 | tcpdump -i lo -nn port 9995 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes 14:49:33.004041 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 1464 14:49:43.006334 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 1464 14:49:48.003252 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 264 14:49:53.002271 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 744 14:49:58.002295 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 456 |