ntop局域网络流量监控


所属类别:Linux

文章作者:chenwenming

特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!


ntop是基于sniffer的一种网络监控工具。把它安装在网关上面监控一段网络真的不错。他可以显示总的流量,还可以显示网段内机器的流量,包含每种服务的流量等。功能真的很强大。 但是由于他是基于抓包的,比较耗费cpu资源1.安装前要安装#yum net-snmp-utils#yum net-snmp这二个包直接yum就行了,下面二个包要到http://rpm.pbone.net/自己找.#rpm -ivh zenoss-2.1.1-0.el5.i386.rpm#rpm -ivh ntop-3.3-1.el5.rf.i386.rpm2.配置备份ntop.conf# cp /etc/ntop.conf /etc/ntop.conf.bak建立NTOP储存db的资料夹:# mkdir /var/www/html/ntop# chown ntop.ntop /var/www/html/ntop# ntop -A //设置ntop管理员密码3.启动#ntop -d -P /var/www/html/ntop/ -u nobody #基本-d表示后台启动 -w表示端口 -i表示接口如果前面没有运行 ntop -A的话,启动画面跳过,跑到一半时会要求输入密码ntop startup - waiting for user response!Please enter the password for the admin user:Please enter the password again:要让系统启动时就启动ntop的话# echo ´ntop -d -u nobody -P /var/www/html/ntop/ -w 3000 -i eth0´ > /etc/rc.local4.测试和管理预设的port为3000,如果您要自订port的话,请在启动NTOP时,加上一个参数,-w 比如说如果我要把它改成6000的话,可以这样做: ntop -P /var/www/html/ntop -u nobody -w 6000接下来开启浏览器,输入 http://IP address:3000,就可以看到NTOP的流量统计的网页.5.后记:更多NTOP的参数,请看man page.=============================另外一个例子环境redhat9.0单块网卡 软件 gdome2-0.7.2-1.i586.rpm ntop-3.0-0.i386.rpm 下载地址 ftp://ftp.task.gda.pl/vol/d35/ftp.pld-linux.org/dists/1.1/PLD/i586/PLD/RPMS/gdome2-0.7.2-1.i586.rpm http://puzzle.dl.sourceforge.net/sourceforge/ntop/ntop-3.0-0.i386.rpm 1.下载 cd/tmp wget-c-qftp://ftp.task.gda.pl/vol/d35/ftp.pld-linux.org/dists/1.1/PLD/i586/PLD/RPMS/gdome2-0.7.2-1.i586.rpm& wget-c-qhttp://puzzle.dl.sourceforge.net/sourceforge/ntop/ntop-3.0-0.i386.rpm& rpm-ivhgdome2-0.7.2-1.i586.rpm rpm-ivhntop-3.0-0.i386.rpm 2.建立ntop.conf cp/etc/ntop.conf.sample/etc/ntop.conf 3.首次启动(root) /usr/bin/ntop-P/usr/share/ntop-untop-A #-P[directory]指定.db档存放路径 #-u[user]指定service启动user #-A设定admin密码,ntop会内建admin管理者帐号于ntop中 4.查看首次启动所需动作 less/usr/share/doc/ntop-3.0/1STRUN.txt 5.编修/etc/ntop.conf档 vi/etc/ntop.conf 内容如下: #eth0是我的单块网卡lo是回路 --interfaceeth0,lo #--no-mac #由于我只是一台机器所以下面的没加,如果您是在路由器或网关上请把对应的ip段改成自己的 --local-subnets192.168.10.0/24 #运行端口 --http-server3000 #数据库存放路径 --db-file-path/usr/share/ntop #守护进程方式运行 --daemon #用户名 --userntop #默认运行等级 --trace-level3 #跳过所有错误 --disable-schedyield 6.启动ntop /etc/init.d/ntopstart 7.查看网络流量 http://localhost:3000/ 8.停止为 /etc/init.d/ntopstop http://www.ntop.org/ntop.html为ntop首页 里面有相关资料及抓图等 ntop若是架设在hub下时便能监视到网络上所有的封包。但若是架设在switch环境下时,除非是开放SPAN的功能否则只能监测给自己的封包。 本机测试环境为单机,标准安装。未配置插件条件下。如有兴趣可自行研究插件 由于ntop需要监听端口,所以最好用iptables限定某些ip可以浏览 否则可能带来安全性问题

相关信息

· ServerVariables对路径的操作(转)

· 基于ASP.NET MVC框架开发Web论坛应用程序

· TomCat3.2.1的配置

· 花絮:洛杉矶PDC2008上的中国制造








....

42116 11500