Linux中安装snort
时间: 2023-12-31 18:23:01 浏览: 90
linux 安裝snort
以下是在Linux中安装snort的步骤:
1.安装依赖项
```shell
sudo apt-get update
sudo apt-get install -y build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev ethtool
```
2.下载和安装snort
```shell
wget https://www.snort.org/downloads/snort/snort-2.9.17.tar.gz
tar -xvzf snort-2.9.17.tar.gz
cd snort-2.9.17
./configure --enable-sourcefire --disable-open-appid
make
sudo make install
```
3.更新共享库
```shell
sudo ldconfig
```
4.创建符号链接
```shell
sudo ln -s /usr/local/bin/snort /usr/sbin/snort
```
5.添加规则
```shell
sudo mkdir /etc/snort/rules
sudo touch /etc/snort/rules/my.rules
sudo echo 'include $RULE_PATH/my.rules' >> /etc/snort/snort.conf
```
6.启动snort
```shell
sudo snort -l snort_log/ -c /etc/snort/snort.conf -K ascii
```
阅读全文