snort3安装教程

系统:ubuntu14.04.1
系统:centos7

一、安装前准备

ubuntu

apt-get autoremove cmake
tar xf cmake-3.12.0.tar.gz && cd cmake-3.12.0
./configure && make && make install
cmake -version
apt install zlib1g libpcre3 libdnet tcpdump libpcap-dev libdumbnet-dev hwloc libhwloc-dev libluajit-5.1-dev -y

centos

默认版本就是cmake 3.12.0,无需卸载重装

yum install libdnet-devel hwloc-devel openssl-devel zlib-devel pkgconfig luajit-devel pcre-devel libpcap-devel libnfnetlink-devel libnetfilter_queue-devel -y
sudo autoreconf -ivf

二、安装daq

tar xf daq-2.2.2.tar.gz && daq-2.2.2
./configure && make && make install && ldconfig

三、安装可选依赖

省略

四、安装snort

进入snort源码目录

cd /home/snort3 && ./configure_cmake.sh --prefix=/home/snort 
cd /home/snort3/build && make -j8 && make install

报错:lua_wrap.sh的permission denied,去修改该文件夹下所有文件权限为可执行

chmod 775 snort3/src/managers/*  
chmod 775 snort3/doc/scripts/*  

五、使用snort

在官网下载snort规则库:

https://www.snort.org/downloads/snortplus/snort3-3.0.3-1.tar.gz

解压到当前目录

tar -xvf snort3-3.0.3-1.tar.gz -C /home/snortrules

在snort.lua中修改输出模块,如

alert_full = { 
    file = true
}

使用规则库中的配置文件即可

/home/snort--daq pcap -c /home/snortrules/etc/snort.lua -l /home/bob/

六、卸载

cd /home/snort/build && make uninstall && make distclean
cd /home/daq-2.2.2 && make uninstall && make distclean 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值