aboutsummaryrefslogtreecommitdiff
path: root/net/snort3/files/homenet.lua
diff options
context:
space:
mode:
authorJohn Audia <therealgraysky@proton.me>2022-11-29 05:50:45 -0500
committerTianling Shen <cnsztl@gmail.com>2022-12-08 04:47:38 +0800
commitd6b712cde6c3094562e143df69a8cd600af52be1 (patch)
treea6d73dd30cbf39e45c9014fcc424ed849df80c00 /net/snort3/files/homenet.lua
parent5c17cd1c81370705bf4d1d0331db7559970266e2 (diff)
snort3: unified configs: local.lua and homenet.lua
This commit adds /etc/snort/local.lua and /etc/snort/homenet.lua for user defined config options which is more simplistic than modifying upstream files directly. That can be tedious and decisive to maintain in sync with upstream changes. The init script has been adjusted accordingly. Acknowledgment to amish who maintains the Arch Linux snort-nfqueue package[1] for these ideas and initial code. Another modification is dropping the following args in the call to /usr/bin/snort by the init system as these options are provided in /etc/snort/local.lua: * --daq-dir /usr/lib/daq/ * -A "$alert_module" Instructions to configure snort3: 1. Edit /etc/snort/homenet.lua and redefine HOME_NET and EXTERNAL_NET, for example: HOME_NET = [[ 10.9.8.0/24 192.168.1.0/24 ]] EXTERNAL_NET = "!$HOME_NET" 2. Edit /etc/snort/local.lua to setup options unique to your use case of snort. The default ones I included should be sane for the role of IDS (alert only), but users may easily uncomment some options therein to use IPS (drop) mode. 3. Install or symlink rules to /etc/snort/rules/snort.rules and optionally edit /etc/snort/local.lua to define extra rules files if not using a unified 'snort.rules' References: 1. https://aur.archlinux.org/packages/snort-nfqueue Signed-off-by: John Audia <therealgraysky@proton.me>
Diffstat (limited to 'net/snort3/files/homenet.lua')
-rw-r--r--net/snort3/files/homenet.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/snort3/files/homenet.lua b/net/snort3/files/homenet.lua
new file mode 100644
index 000000000..975f70254
--- /dev/null
+++ b/net/snort3/files/homenet.lua
@@ -0,0 +1,3 @@
+-- setup HOME_NET below with your IP range/ranges to protect
+HOME_NET = [[ 192.168.1.0/24 10.1.0.1/24 ]]
+EXTERNAL_NET = "!$HOME_NET"