安装snort方式
安装snort可以采用源码安装方式或直接在仓库中抓取二进制文件,源码安装方式需要手动安装一些依赖(所用软件中已给出),如pcap
,pcre
,libdnet
,daq
等
### 1.安装snort1
2
3
4sudo apt-get install -y build-essential
sudo apt-get install -y libpcap-dev libpcre3-dev libdumbnet-dev
sudo apt-get install -y bison flex
sudo apt-get install -y snort
2.安装daq (附件中有)
1 | wget https://www.snort.org/downloads/snort/daq-2.0.6.tar.gz |
./configure
如果有仓库中却少相关的依赖需要安装 例如bison,flex,libpcap1
sudo apt-get install bison flex
下载libpcap源码安装1
2
3
4
5
6wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
tar zxvf libpcap-1.8.1.tar.gz
./configure
make
sudo make intall
sudo cp /usr/local/lib/libpcap.* /usr/lib/
回到daq配置./configure
无报错1
2
3
4
5
6
7Build AFPacket DAQ module.. : yes
Build Dump DAQ module...... : yes
Build IPFW DAQ module...... : yes
Build IPQ DAQ module....... : no
Build NFQ DAQ module....... : no
Build PCAP DAQ module...... : yes
Build netmap DAQ module...... : no
编译安装1
2make
sudo make install