您的位置:首页 > 理论基础 > 计算机网络

使用ntopng,在Linux上搭建基于Web的网络流量监控系统

2016-05-05 12:22 1166 查看
Ntopng 简介:
Ntopng是原ntop下一代版本,用于网络流量实时监控显示。Ntopng类似于RMON远端网络监控代理,具有内置的Web服务能力,使用redis键值服务按时间序列存储统计信息。你可以在任何指定的监控服务器上安装ntopng,只需使用任一web浏览器,就能实时访问服务器上的流量报告了。

Ntopng 常用功能说明:
根据许多协议对网络流量进行排序;
显示网络流量和IPv4/v6的活动主机;
显示主机的地理位置;
显示IP的各种协议流量分布;
根据源/目的IP流量分析和排序;
显示IP流量子网矩阵;
报告使用IP协议,按协议类型排序;
生产的HTML5/AJAX网络流量统计;
自动从网络中识别有用的信息;
将截获的数据包转换成易于识别的格式;
对网络环境中通信失败的情况进行分析;
在运行时无需重启;
实时监控工具汇总数据(5分钟);
许多新功能,包括基于HTML5动态图形用户界面,分类,DPI等;
测试环境:
OS:rhel6.5
eth0:192.168.1.106
eth1:192.168.10.254
1,关闭防火墙和NetworkManager 服务
# service iptables stop
# chkconfig iptables off
# service NetworkManager stop
# chkconfig NetworkManager off

2,安装依赖的包
# yum -y install GeoIP-devel GeoIP sqlite-devel libcurl-devel mysql-devel libxml2 libxml2-devel rrdtool rrdtool-devel redis glib2-devel automake autoconf httpd libpcap-devel
# service httpd start
# chkconfig --add httpd
# chkconfig httpd on

3,安装PF_RING
# git clone https://github.com/ntop/PF_RING.git # cd PF_RING/kernel
# make
# insmod ./pf_ring.ko
# cd ../userland
# make

4,安装nDPI
# git clone https://github.com/ntop/nDPI.git # cd nDPI
# ./autogen.sh
# make

5,安装ntopng
# git clone https://github.com/ntop/ntopng.git # cd ntopng
# ./autogen.sh
# ./configure --prefix=/usr/local/ntopng
# /usr/bin/gmake geoip
# make && make install

6,提供配置文件
# mkdir /etc/ntopng
# vim /etc/ntopng/ntopng.conf
-G=/var/tmp/ntopng.pid ###指定运行所用进程号文件
--local-networks "192.168.1.0/24,192.168.10.0/24" ###指定本地子网段
--interface eth0 ###指定监听eth0网卡上的流量
--user ntopng ###指定运行服务所使用账户
--http-port 3333 ###指定web展现的服务端口,如果不指定默认为3000

7,启动ntopng服务
注意,在运行ntopng之前,要确认先启动redis服务,redis为ntopng提供键值存储
# service redis start
# /usr/local/ntopng/bin/ntopng /etc/ntopng/ntopng.conf &

8,访问使用ntopng http://IP:3333 ###ntopng默认账户和密码都是admin

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux 使用 ntopng