ntop bandwithd都用过了。又找到这么一个软件。
装上看看吧。
step1 创建用户ipaudit
#useradd ipaudit
#useradd ipaudit
step2 下载源码包
#wget [url]http://nchc.dl.sourceforge.net/sourceforge/ipaudit/ipaudit-web-1.0BETA9.tar.gz[/url]
#wget [url]http://nchc.dl.sourceforge.net/sourceforge/ipaudit/ipaudit-web-1.0BETA9.tar.gz[/url]
step3 编译安装
#su - ipaudit
tar zxvf ipaudit-web-1.0BETA9.tar.gz
$./configure
$make
$su -
#make install
#make install-cron
#exit
#su - ipaudit
tar zxvf ipaudit-web-1.0BETA9.tar.gz
$./configure
$make
$su -
#make install
#make install-cron
#exit
step4 修改配置文件
#vi /home/ipaudit/ipaudit-web.conf
#vi /home/ipaudit/ipaudit-web.conf
LOCALRANGE=192.168.1 //内网的网段
INTERFACE=eth0 //内网网卡
INTERFACE=eth0 //内网网卡
编辑apache的配置文件
UserDir disable ← 找到这一行,在行首增加“#”
#UserDir public_html ← 找到这一行,去掉行首的“#”
#UserDir public_html ← 找到这一行,去掉行首的“#”
文档没有提到这个地方,如果不打开的话是无法访问到网页的。
在最后添加
<Directory /home/*/public_html>
AllowOverride All
Options MultiViews Indexes Includes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory /home/*/public_html>
AllowOverride All
Options MultiViews Indexes Includes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>
#service httpd reload
然后访问
[url]http://<your[/url] web server>/~ipaudit/
就可以看到了。数据需要等30分钟才能显示出来
就可以看到了。数据需要等30分钟才能显示出来
为了安全可以给cgi-bin加上密码
在/home/ipaduit/pubilc_html/cgi-bin/创建一个文件.htaccess
AuthType Basic
AuthName IPAUDIT
AuthUserFile /home/ipaduit/passwd
require user myself friend boss
AuthName IPAUDIT
AuthUserFile /home/ipaduit/passwd
require user myself friend boss
然后给用户名设置密码
htpasswd -c passwd myself
htpasswd passwd friend
htpasswd passwd boss
htpasswd passwd friend
htpasswd passwd boss
转载于:https://blog.51cto.com/coolerfeng/68971