Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Snort bug fix

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      morbus
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        Thanks, commited!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.