服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

运维之家

 找回密码
 注册
搜索
查看: 6544|回复: 0

IPAudit网络监控安装和设置

[复制链接]
dirtysea 发表于 2012-2-28 13:47:02 | 显示全部楼层 |阅读模式
1、  安裝所需要的組件gcclibpcapgnuplot, gzip, tar, unzip, make, lynx, ncftpget, wget, perlTime::ParseDate。(說明:libpcap安裝yum –y install libpcap*
2、 安裝ipaudit-web
         A、 新增用戶  useradd ipaudit
         B、 ipaudit登陸cd /home/ipaudit/
    取得軟件wgethttp://ncu.dl.sourceforge.net/project/ipaudit/ipaudit-web/ipaudit-web-1.0BETA9/ipaudit-web-1.0BETA9.tar.gz
         C、 安裝:
          tar xvzf ipaudit-web-1.0BETA9.tar.gz
          mv ipaudit-web-1.0BETA9 ipaudit-web   #改名
          cd ipaudit-web/compile
          ./configure
          make

    以root登入
         cd ~ipaudit/ipaudit-web/compile
         make install
         make install-cron

         #crontab -l                           //看是不是有寫入排程(記得是用ipaudit身份去看)
           0,30 * * * * cron/cron30min
          15 0 * * * cron/crondaily
          15 1 * * * cron/cronclean
           45 1 * * 0 cron/cronweekly
           45 2 1 * * cron/cronmonthly

3、 配置ipaudit-web.conf
        #vi /home/ipaudit/ipaudit-web.conf   //修改設定檔以符合您主機條件
         LOCALRANGE=127.0.0                   //default
         LOCALRANGE=172.16.100.0/22:172.16.104.0/21:192.168.0.0/24:192.168.1.0/24   //指定您的網段
4、 配置httpd.conf
         A、編輯httpd.conf的配置文件
         UserDir disable ←找到這一行,在行首增加「#
        #UserDir public_html ←找到這一行,去掉行首的「#
         B、讓httpd支持cgi功能
    在httpd.conf最後加入以下內容
<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>

5、執行排程及觀看成果
./cron/cron30min      //ipaudit身份執行,要過個三十分鐘圖跟資料才會出現哦
http://your_host_ip/~ipaudit




為了安全可以給cgi-bin加上密碼

/home/ipaduit/pubilc_html/cgi-bin/創建一個文件.htaccess
   AuthType Basic
   AuthName IPAUDIT
   AuthUserFile /home/ipaduit/passwd
   require user   myself friend boss

然後給用戶名設置密碼
   htpasswd -c passwd myself
   htpasswd    passwd friend
   htpasswd    passwd boss







裝好ipaudit點選左邊會出現錯誤訊息500 Internal Server Error?
Error Meaage:
裝好ipaudit後,圖畫出來了,但點選左邊要看詳細資料時卻出現Internal Server Error

Ans:
我的狀況是我去看了一下httpd-error.log他說設定檔權限有問題
#tail httpd-error.log
Can't Open /home/ipaudit/ipaudit-web.conf: Permission denied
[Fri May 14 21:22:44 2004] [error] [client 61.64.228.168] Premature end of  script headers:
/home/ipaudit/public_html/cgi-bin/ipahttp 改了一下權限左邊搞定~~^^
#chmod 755 ipaudit-web.conf
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|运维之家

GMT+8, 2024-3-29 19:48 , Processed in 0.089217 second(s), 18 queries .

Powered by Dirtysea

© 2008-2020 Dirtysea.com.

快速回复 返回顶部 返回列表