Snort bug fix
-
I have been having a problem with snort where it would randomly start blocking offenders despite my config not having that option on.
I finally tracked it down to the "clear log" button in snort_alerts.php The button had no checking to see if you had chosen to block or not it would just start snort2c.
I added the following into the php to check if you want to block before starting snort2c
if ($config['installedpackages']['snort']['config'][0]['blockoffenders'] == 'on'){ exec("/usr/local/bin/snort2c -w /var/db/whitelist -a /var/log/snort/alert"); }
Attached is a replacement snort_alerts.php (remove the .txt bit)
I don't know how to submit a patch so if you want it as a patch file can someone point me in the right direction
Hope this helps
snort_alerts.php.txt -
Thanks, commited!
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.