使用ntop监控局域网网络流量

NTOP 简介
Ntop是一个网络使用状况监测软件,在互动模式下,ntop会将网络的使用状况显示在使用者的终端机画面上。在Web模式中,ntop会像Web 

Server一样产生出内含网络使用状况的网页传回到使用者的浏览器上。
NTOP显示网络的使用情况比MRTG更加直观、详细。NTOP甚至可以列出每个节点计算机的网络带宽利用率。  
NTOP的功能  
NTOP主要提供以下一些功能:  
 ◆自动从网络中识别有用的信息;  
 ◆ 将截获的数据包转换成易于识别的格式;  
 ◆ 对网络环境中通信失败的情况进行分析;  
 ◆ 探测网络环境中的通信瓶颈;  
 ◆ 记录网络通信的时间和过程。  
  它可以通过分析网络流量来确定网络上存在的各种问题;也可以用来判断是否有黑客正在攻击网络系统;还可以很方便地显示出特定的网络协议、占用大量带宽的主机、各次通信的目标主机、数据包的发送时间、传递数据包的延时等详细信息。通过了解这些信息,网管员可以对故障做出及时的响应,对网络进行相应的优化调整,以保证网络运行的效率和安全。

操作系统RHEL5.2
NTOP: ntop-3.3.7


1.下载地址
http://www.ntop.org/download.html

2.安装 libpcap
http://www.tcpdump.org/
[root@RHEL5 libpcap-0.9.8]# ./configure 
[root@RHEL5 libpcap-0.9.8]# make
[root@RHEL5 libpcap-0.9.8]# make install

3.安装RRDtool,需要libphg,freetype,libart
1).安装libpng (http://oss.oetiker.ch/rrdtool/pub/libs/ )
tar zxvf libpng-1.2.18.tar.tar
cd libpng-1.2.18
cp scripts/makefile.linux ./makefile
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个

2).安装freetype (http://oss.oetiker.ch/rrdtool/pub/libs/ )
tar zxvf freetype-2.3.5 .tar.gz
cd freetype-2.3.5 
./configure --prefix=/usr/local/freetype
make
make install

3)安装 libart_lgpl-2.3.20.tar.gz (http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/)
./configure 
make
make install

4)安装RRDTool 
下载地址:
http://oss.oetiker.ch/rrdtool/
cp /usr/local/freetype/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/
ln -s /usr/local/include/libart-2.0 /usr/include
cp /usr/local/freetype/lib/libfreetype.* /usr/lib

./configure --disable-python --disable-tcl
make
make install

ln -s /usr/local/rrdtool-1.2.27/bin/* /usr/local/bin/

ln -s /usr/local/rrdtool-1.2.27/ /usr/local/rrdtool

//执行rrdtool看是否安装正确


4 安装ntop
useradd ntop
./autogen.sh --prefix=/usr/local/ntop --disable-ipv6
make
make install
以ntop来运行ntop,先给其数据存储目录设置权限
chown -R ntop.ntop //usr/local/ntop/share/ntop
/usr/local/ntop/bin/ntop -P /usr/local/ntop/share/ntop/ -u ntop -A

修改配置文件
cp packages/RedHat/ntop.conf.sample /usr/local/ntop/etc/ntop/ntop.conf
vi /usr/local/ntop/etc/ntop/ntop.conf

--user ntop #程序运行用户
--daemon #设置ntop为服务
--db-file-path /usr/local/ntop/share/ntop #数据文件存放目录
--interface eth0
--trace-level 3
--http-server 3000 #web访问的端口
--disable-schedyield


启动ntop服务,指定读取的配置文件,只监控192.168.7.0/24网段
/usr/local/ntop/bin/ntop @/usr/local/ntop/etc/ntop/ntop.conf -m 192.168.7.0/24


5 安装完成
访问 http://192.168.7.192:3000

上图







转载:http://blog.chinaunix.net/space.php?uid=1838361&do=blog&cuid=1183884

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值