在ubuntu9.04中安装Snort
Net 2009-10-09 10:24 阅读5 评论0 字号: 大大 中中 小小 1、
sudo apt-get install libpcap0.8-dev
sudo apt-get install libmysqlclient15-dev
sudo apt-get install mysql-client-5.0
sudo apt-get install mysql-server-5.0 -----密码admin
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install apache2
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-gd
sudo apt-get install php5-mysql
sudo apt-get install libphp-adodb
sudo apt-get install php-pear
2、
sudo -i
# Then your password
apt-get install libc6-dev g++ gcc
3、
cd /root
mkdir snorttmp
cd /root/snorttmp
wget http://dl.snort.org/snort-current/snort-2.8.5.tar.gz
tar -xzvf /root/snorttmp/snort-2.8.5.tar.gz
rm /root/snorttmp/snort-2.8.5.tar.gz
4、
cd /root/snorttmp/snort-2.8.5
wget http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/snortrules-pr-2.4.tar.gz
tar -xzvf /root/snorttmp/snort-2.8.5/snortrules-pr-2.4.tar.gz
rm /root/snorttmp/snort-2.8.5/snortrules-pr-2.4.tar.gz
5、
cd /root/snorttmp
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
tar -xzvf /root/snorttmp/pcre-7.4.tar.gz
rm /root/snorttmp/pcre-7.4.tar.gz
6、
cd /root/snorttmp
wget http://downloads.sourceforge.net/secureideas/base-1.3.8.tar.gz?modtime=1183896336&big_mirror=0
tar -xzvf /root/snorttmp/base-1.3.8.tar.gz
rm /root/snorttmp/base-1.3.8.tar.gz
7、
cd /root/snorttmp
wget http://downloads.sourceforge.net/adodb/adodb502a.tgz?modtime=1191343792&big_mirror=0
tar -xzvf /root/snorttmp/adodb502a.tgz
rm /root/snorttmp/adodb502a.tgz
ls /root/snorttmp
You should see the following folders,
adodb5
base-1.3.8
pcre-7.4
snort-2.8.5
8、
a. PCRE install.
cd /root/snorttmp/pcre-7.4
./configure
make
make install
b. Snort install.
cd /root/snorttmp/snort-2.8.5
Here we will do a make/install
./configure -enable-dynamicplugin --with-mysql
make
make install
9、
mkdir /etc/snort /etc/snort/rules /var/log/snort
cd /root/snorttmp/snort-2.8.5/rules
cp * /etc/snort/rules/
cd /root/snorttmp/snort-2.8.5/etc
cp * /etc/snort/
cp /usr/local/lib/libpcre.so.0 /usr/lib
10、
vim /etc/snort/snort.conf
Change "var HOME_NET any" to "var HOME_NET 192.168.1.0/24" (your home network may differ from 192.168.1.0)
Change "var EXTERNAL_NET any" to "var EXTERNAL_NET !$HOME_NET" (this is stating everything except HOME_NET is external)
Change "var RULE_PATE ../rules" to "var RULE_PATH /etc/snort/rules"
Scroll down the list to the section with "# output database: log, mysql, user=", remove the "#" from in front of this line.
Leave the "user=root", change the "password=password" to "password=YOUR_PASSWORD", "dbname=snort"
Make note of the username, password, and dbname. You will need this information when we set up the Mysql db.
Save and quit.
11、
mysql -u root -p
mysql> SET PASSWORD FOR root@localhost=PASSWORD('YOUR_PASSWORD');
mysql> create database snort;
mysql> exit
mysql -D snort -u root -p < /root/snorttmp/snort-2.8.0/schemas/create_mysql
vim /etc/snort/rules/web-misc.rules
Comment out line's 97, 98, and 452 with a "#" (no quotes).
12、
snort -c /etc/snort/snort.conf
If everything went well you should see an ascii pig.
To end the test hit ctrl + c.
13、
vim /var/www/test.php
write in it:
<?php
phpinfo();
?>
vim /etc/php5/apache2/php.ini
You need to add the following under "Dynamic Extensions".
extension=mysql.so
extension=gd.so
/etc/init.d/apache2 restart
ifconfig -a
14、
mv /root/snorttmp/adodb5 /var/www/
mkdir /var/www/web
mv /root/snorttmp/base-1.3.8 /var/www/web/
chmod 757 /var/www/web/base-1.3.8
vim /var/www/web/base-1.3.8/setup/setup1.php
Find the line that says "base_header" and change it to "header".
Save and exit.
pear install Image_Color
pear install Image_Canvas-alpha
pear install Image_Graph-alpha
15、
Open a web browser and navigate to http://YOUR.IP.ADDRESS/web/base-1.3.8/setup.
Click continue on the first page.
Step 1 of 5: Enter the path to ADODB.
This is /var/www/adodb5.
Step 2 of 5:
Database type = MySQL, Database name = snort, Database Host = localhost, Database username = root, Database Password =
YOUR_PASSWORD
Step 3 of 5: If you want to use authentication enter a username and password here.
Step 4 of 5: Click on Create BASE AG.
Step 5 of 5: one step 4 is done at the bottom click on Now continue to step 5.
Bookmark this page.
Change the permissions back on the /var/www/web/base-1.3.8 folder.
# chmod 775 /var/www/web/base-1.3.8
We are done. Congrats!!!
To start Snort in the terminal type:
# snort -c /etc/snort/snort.conf -i eth0 -D
This starts snort using eth0 interface in a daemon mode.
To make sure it is running you can check with the following command:
# ps aux | grep snort
If it's running you will see an entry similar to snort -c /etc/snort/snort.conf -i eth0 -D.
If you would like to learn how to write your own Snort rules there is a guide at
http://www.snort.org/docs/snort_manual/node16.html.
Good luck.
分享到:
相关推荐
- 注意:这里的版本号可能会根据实际情况有所不同,例如在安装VMware 6.5时,显示的可能是`VMwareTools-7.8.4-126130.i386.rpm`。 4. **执行安装脚本**: - 进入解压后的安装文件目录:`cd ./vmware-tools-...
这些软件包包含了在Ubuntu 9.04下安装SimpleScalar所需的所有组件。 #### 3. 安装过程 ##### 3.1 解压缩 - **操作步骤**:将这三个软件包放置于 `/root` 目录下,创建一个新的 `simplescalar` 文件夹,将这些文件...
在本篇文章中,我们将深入探讨如何安装Ubuntu 9.04操作系统,这是一款基于Debian的Linux发行版,因其稳定性、易用性和强大的开源社区支持而受到广大用户的喜爱。Ubuntu 9.04,代号Jaunty Jackalope,发布于2009年,...
在安装过程中,用户首先会遇到的是下载Ubuntu 9.04的ISO镜像文件,这通常可以通过Ubuntu官方网站或者镜像站点完成。下载完成后,用户需要将其刻录到DVD光盘或制作成USB启动盘,以便在目标计算机上进行安装。 安装...
标题中的“硬盘安装Ubuntu 9.04过程详解”指的是在个人计算机的硬盘上安装Linux Ubuntu 9.04操作系统的详细步骤。Ubuntu 9.04,代号“Jaunty Jackalope”,是Ubuntu发布的一个较早的版本,于2009年推出,它提供了对...
在Ubuntu 9.04中安装Memcachedb是一个相对直接的过程,但如果希望在系统上顺利运行Memcachedb,用户需要了解一些前置知识,包括对Memcachedb的基本认识、相关依赖库的安装,以及在Ubuntu系统上进行安装操作的具体...
对于学习ubuntu 9.04的童鞋很有用滴
请注意,上述命令中的“jaunty”指的是Ubuntu 9.04的代号,确保这些行与您的系统版本匹配。 4. **更新软件包列表**:保存并关闭编辑器后,运行以下命令来更新软件包列表。 ```bash sudo apt-get update ``` ##...
在Ubuntu 9.04操作系统中,中文输入法的安装对于使用中文的用户来说是必不可少的。这个压缩包提供了一套完整的解决方案,包含了多种输入法引擎和必要的支持库,以确保用户能够在系统中流畅地输入中文。以下是关于这...
Ubuntu 9.04 ISPconfig设置
ubuntu 9.04 安装配置优化全记录
Ubuntu-9.04-1gb.7z,是colinux下的Ubuntu 9.04的镜像文件~
- 在安装过程中一定要注意数据备份,以免误操作导致重要数据丢失。 - 分区时要考虑到Windows系统及其应用程序所需的空间,避免因为分区过小而导致无法正常使用。 - 安装完成后可能需要调整GRUB的配置以确保能够顺利...
OpenERP Installing Ubuntu9.04
标题中的“ubuntu9.04翻译软件stardict词典”指的是在Ubuntu 9.04操作系统上使用的Stardict翻译软件。Stardict是一款开源的、强大的词典和翻译工具,它支持多种语言和词典格式,允许用户在Linux环境下进行高效的词汇...
在Ubuntu 9.04操作系统中,中文输入法的配置对于中文用户来说是必不可少的。这个资源包提供了多种中文输入法方案,包括五笔码和拼音等常见输入方式,使得在Linux环境下输入中文变得更加便捷。下面我们将详细探讨这些...
接下来,需要修改 Ubuntu 的 `/bin/sh` 的默认连接,以避免在安装过程中出现错误。步骤如下: 1. 使用 root 用户权限进入 `/bin` 目录。 2. 查看当前 `/bin/sh` 的指向。 3. 将 `/bin/sh` 的软链接指向 `bash`。 ...
教程名称:Ubuntu 9.04 Linux视频教程23讲课程目录:【】01_简介【】02_安装篇_CD【】03_安装篇_Live.USB【】04_安装篇_LiveUSB安装【】05_安装篇_wubi安装【】06_基本命令篇_目录结构【】07_基本命令篇_ls【】08_...