互联网上的这些操作指南已经过时,而且它所依赖的软件也没有更新到 PHP5.5。我对 ACID 和 ADODB 进行了一些修改,使部分 GUI 能够正常工作。我按照这个指南设置了 barnyard2http://sathisharthars.wordpress.com/2014/05/03/configuring-snort-with-barnyard-snortreport-acid-in-ubuntu-14-04/我曾尝试遵循其他指南,但无法成功启动 snort 和 barnayrd,也无法使 ACID gui 正常运行。https://www.google.co.uk/search?q=start+snort+with+barnyard2&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&channel=sb&gfe_rd=cr&ei=yPXMU7OvCKfY8gfn2IGADQ
我在使用 snort 时遇到的问题
/usr/local/bin/snort -D -u snort -g snort -c /etc/snort/snort.conf -i eth0 /usr/local/bin/barnyard2 -c /etc/snort/etc/barnyard2.conf -d /var/log/snort -f snort.u2 -w /var/log/snort/barnyard2.waldo -D
上面的行因选项失败w
FATAL ERROR: Invalid option: w.
如果我取出 w 我会得到下一个错误
FATAL ERROR: /etc/snort/etc/barnyard2.conf(27) Unknown config directive: reference_file.
我无法开始呼噜。
我启动了 barnyard2,并在日志文件中看到以下错误
barnyard2 -c /etc/snort/etc/barnyard2.conf -f merged.log
WARNING: Ignoring corrupt/truncated waldofile '/var/log/snort/barnyard2.waldo'
Jul 21 12:04:18 website-dev barnyard2: ERROR: Unable to open directory '' (No such file or directory)
Jul 21 12:04:18 website-dev barnyard2: ERROR: Unable to find the next spool file!
经过一番努力,我终于让 ACID 在 Apache 上加载,并使其与 php5.5 兼容
答案1
- 使用 vm centos 7 64 位最小安装
禁用 selinex 和防火墙
systemctl stopfirewalld(停止防火墙)
systemctl disablefirewalld(系统防火墙禁用)
更新服务器
- [https://www.snort.org/documents/4pdf]
https://www.snort.org/downloads
yum 更新 -y yum 安装 gcc flex bison zlib zlib-devel libpcap libpcap-devel pcre pcre-devel libdnet libdnet-devel tcpdump wget net-tools mariadb-server -y
从以下位置获取 libdnetdebughttp://rpm.pbone.net/index.php3/stat/4/idpl/15290376/dir/redhat_el_6/com/libdnet-debuginfo-1.12-6.el6.x86_64.rpm.html
rpm -ivh libdnet-debuginfo-1.12-6.el6.x86_64.rpm cd /usr/local/src wget https://www.snort.org/downloads/snort/snort-2.9.6.2.tar.gz wget https://www.snort.org/downloads/snort/daq-2.0.2.tar.gz # install daq tar -zxvf daq-2.0.2.tar.gz cd daq-2.0.2 ./configure make make install cd /usr/local/lib ldconfig -v /usr/local/lib # install snort cd /usr/local/src/snort-2.9.6.2 ./configure --enable-sourcefire make make install cd /usr/local/lib ldconfig -v /usr/local/lib cd /etc mkdir -p snort cd snort cp /usr/local/src/snort-2.9.6.2/etc/* . # get latest rule set wget https://www.snort.org/downloads/registered/snortrules-snapshot-2962.tar.gz tar -zxvf snortrules-snapshot-2962.tar.gz cp ./etc/* . touch /etc/snort/rules/white_list.rules /etc/snort/rules/black_list.rules #configure groupadd -g 40000 snort useradd snort -u 40000 -d /var/log/snort -s /sbin/nologin -c SNORT_IDS -g snort chown -R snort:snort * chown -R snort:snort /var/log/snort
- 修改snort.conf
- ** 变量 RULE_PATH /etc/snort/rules
- ** IP 变量 HOME_NET 192.168.1.0/24
- ** ipvar EXTERNAL_NET !$HOME_NET
- ** 变量 SO_RULE_PATH /etc/snort/so_rules
- ** 变量 PREPROC_RULE_PATH /etc/snort/preproc_rules
- ** 变量 WHITE_LIST_PATH /etc/snort/rules
- ** 变量 BLACK_LIST_PATH /etc/snort/rules
配置
cd /usr/local/src chown -R snort:snort * chmod -R 700 * chown -R snort:snort snort_dynamicsrc chmod -R 700 snort_dynamicsrc cd /usr/local/lib chown -R snort:snort snort* chown -R snort:snort pkgconfig chmod -R 700 snort* chmod -R 700 pkgconfig chown -R snort:snort daq-modules-config chown -R snort:snort u2* chmod -R 700 daq-modules-config chmod 700 u2* cd /etc chown -R snort:snort snort chmod -R 700 snort mkdir -p /usr/local/lib/snort_dynamicrules chown -R snort:snort /usr/local/lib/snort_dynamicrules chmod -R 700 /usr/local/lib/snort_dynamicrules
需要编辑 stream5 的配置以消除警告,因为有 1mb 的限制http://manual.snort.org/node17.html#SECTION00322600000000000000
snort -q -u snort -g snort -c /etc/snort/snort.conf -i ens34 -D
增加接口上的 rxhttp://www.gamelinux.org/?page_id=284
ethtool -G ens34 rx 4096
- 对于 GUI 使用 '''Snorby'''https://snorby.org/