debian上配置IDS
照参网上资料使用snort打造IDS配置.
1,设置mysql
#mysql -u -p
mysql>create database ids;
mysql>grant insert,select,update on ids.* to ids@localhost identified by '123456';
至此已经建立了名为ids的数据库做为snort侦测系统数据库,并建立了用户ids,密码为123456,设置了此用户在ids数据库上的权限。
2,下载软件
#apt-get install snort mysql-snort
从网上寻找adodb和base并下载
3,导入数据库结构
#cd /usr/share/doc/snort/
#mysql –D ids –u root –p < create_mysql
4,配置snort
#vi /etc/snort/snort.conf
修改下列一行为:
====================
output database: log, mysql, user=ids password=123456 dbname=ids host=localhost
===========================
#/etc/init.d/snort restart
5,安装配置base和adodb
#tar -zxvf base-1.3.8.tar.gz
#mv base-1.3.8 /var/www/base
#unzip -zxvf ado497.zip
#mv adodb /var/www/base/db
#cd /var/www/base
#mv base_config.php.dist base_config.php
#vi base_config.php
修改以下为:
============
$DBlib_path = '/var/www/base/db';
$alert_dbname = 'ids';
$alert_host = 'localhost';
$alert_port = '';
$alert_user = 'ids';
$alert_password = '123456';
==============
6,最后检查
打开浏览器输入http://localhost/base