ndrosis
(nikosd)
September 29, 2026, 10:43pm
1
Hi all, On NethSecurity 8.8.0, the IPS doesn’t work correctly when persistent storage is enabled.
With storage enabled: Snort runs but loads only 208 rules (file_id rules), /var/ns-snort/rules/ is empty, and no alerts are ever generated.
With storage disabled: snort.rules appears in /var/ns-snort/rules/ and the IPS works correctly.
Is this a known issue? Is there a supported way to keep the storage enabled and still have the IPS rules loaded?
Thanks!
mark_nl
(Mark Verlinde)
September 30, 2026, 9:45am
2
If persistent storage is enabled all the rules are joined together at every (re)start of the snort service in /mnt/data/ns-snort/rules/snort.rules. On the command line this becomes visible with:
# service snort restart
Backup created at /mnt/data/ns-snort/old.rules
Processing rule file /mnt/data/ns-snort/snort-rules/rules/snort3-protocol-icmp.rules
<TRUNCATED>
Processing rule file /mnt/data/ns-snort/snort-rules/rules/snort3-browser-firefox.rules
Appended 9186 rules to /mnt/data/ns-snort/rules/snort.rules
Removing testing rules...
Note the 9186 rules , However in the logs there is no prove this rules-file is actually loaded, in /mnt/data/log/messages the rule count is indeed quite low (219 in my case)
.... snort[23465]: rule counts
.... snort[23465]: total rules loaded: 219
.... snort[23465]: text rules: 219
.... snort[23465]: option chains: 219
.... snort[23465]: chain headers: 1
So, I think @ndrosis has a point here.
Tbaile
(Tommaso Bailetti)
September 30, 2026, 12:46pm
3
We have indeed saved the snort rulesets in the storage to allow faster boots and less downloads upon reboots.
opened 10:04AM - 29 Apr 26 UTC
closed 09:56AM - 13 May 26 UTC
verified
## Steps to reproduce
1. Deploy NethSecurity with snort3 enabled
2. Reboot the … system without internet connectivity
3. Observe system behavior during boot
## Expected behavior
System should boot normally. If snort rules are unavailable, snort should start without rules or with cached rules. Reboot should complete in reasonable time.
## Actual behavior
Snort's init script synchronously attempts to download rules during boot. When internet is unavailable:
- Rule download times out after 10 seconds
- Retry loop runs 6 times with 10 second sleeps
- Total blocking time: up to 120 seconds
- Procd is blocked during this entire period
- System reboot command hangs and does not complete
## Suggested fix
1. Store downloaded rule archives in persistent storage (/mnt/data/ns-snort when available)
2. Add connectivity check before attempting download (ping 1.1.1.1 / 8.8.8.8)
3. Skip download if no cached rules and no connectivity (log warning)
4. Reduce retry loop timeouts
This prevents the boot hang and allows reboot to complete even without internet.
## Logs
Device without internet fails to reboot:
```
root@NethSec:~# reboot
<device hangs for 120+ seconds>
```
## Component and version
nethsecurity snort3 package (3.9.5.0)
This smells like a bug, I’ll investigate further.
mark_nl
(Mark Verlinde)
September 30, 2026, 5:03pm
4
Tbaile:
This smells like a bug,
Like a skunk…
Testing this atm:
committed 04:53PM - 30 Sep 26 UTC
Which shows the rules are loaded after a reboot in /mnt/data/log/messages:
...... snort[7002]: --------------------------------------------------
...... snort[7002]: rule counts
...... snort[7002]: total rules loaded: 9362
...... snort[7002]: duplicate rules: 43
...... snort[7002]: text rules: 9362
...... snort[7002]: option chains: 9362
...... snort[7002]: chain headers: 312
...... snort[7002]: flowbits: 83
...... snort[7002]: flowbits not checked: 3
...... snort[7002]: flowbits not set: 76
...... snort[7002]: --------------------------------------------------
EDIT : there was a bug in this reply:
--- Like a skunk...;
+++ Like a skunk...;)
I just want to clarify that the remark was meant to be funny, to show that your hunch was right.
ndrosis
(nikosd)
September 30, 2026, 7:39pm
5
Thanks for the help, the suggested solution works.
After applying it, the rules are now loaded correctly. This is the output:
# ls -l /var/snort.d/snort_conf.lua /var/ns-snort/rules/
sed -n '15,25p' /var/snort.d/snort_conf.lua
ips = {
-- View all options with "snort --help-module ips"
mode = 'inline',
variables = default_variables,
--enable_builtin_rules=true,
rules = [[
include /var/ns-snort/rules/snort.rules
]],
}
daq = {
snort -c /var/snort.d/snort_conf.lua --tweaks ns_local -T 2>&1 | grep -i "total rules loaded"
total rules loaded: 9289
snort.rules is present in /var/ns-snort/rules/ and snort_conf.lua includes it, so the IPS is now loading the rules.
ndrosis
(nikosd)
October 2, 2026, 1:16pm
6
Hi,
I noticed a possible issue with BanIP in NethSecurity.
When Storage is enabled , BanIP does not seem to read the log file correctly, and therefore the expected bans/log processing do not work.
I found that I have to manually set the log file path from the CLI:
uci set banip.global.ban_logreadfile='/mnt/data/log/messages'
uci commit banip
/etc/init.d/banip restart
After applying the above configuration and restarting BanIP, it works as expected.
It seems that when Storage is enabled, BanIP does not automatically detect/use the correct /mnt/data/log/messages path.
Could you please confirm whether this is expected behavior or a bug?
Environment:
NethSecurity: 8.8.0
BanIP: 1.8.10
Storage: Enabled
Thanks!
Μετέφερα αυτό το θέμα σε νέο θέμα για καλύτερη προβολή και για να διατηρήσω τη συζήτηση ξεχωριστή.
Το BanIP δεν διαβάζει σωστά τα αρχεία καταγραφής όταν είναι ενεργοποιημένη η αποθήκευση
Tbaile
(Tommaso Bailetti)
October 2, 2026, 2:45pm
7
Hi, I’d suggest moving this into another topic, but it’s the correct behaviour.
See, BanIP only needs current logs, which are available under /var/log/messages, however this path is volatile and gets deleted upon reboot.
The /mnt/data/log/messages is just the same file, but stored on non-volatile storage.
If you have any other issue, feel free to report them in another topic, or if a mod can split this conversation, it’ll be much appreciated.
ndrosis
(nikosd)
October 2, 2026, 4:38pm
8
I moved this issue to a new topic for better visibility and to keep the discussion separate.
BanIP does not read logs correctly when Storage is enabled