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

    Snort: "Update rules automatically"

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 1.9k 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.
    • S
      sergu61
      last edited by

      Upgrade rules on cron

      (3 */12 * * * root /usr/bin/nice-n20 /usr/local/bin/php -f /usr/local/pkg/snort/snort_check_for_rule_updates.php >> /usr/local/etc/snort/snort_update.log)

      does not work!

      I receive in /usr/local/etc/snort/snort_update.log:

      You must enter valid credentials to access this resource.

      ???

      Serg Max

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

        Works after editing snort_check_for_rule_updates.php:

        ….
        require_once("globals.inc");                 
        / require_once("guiconfig.inc"); /          
        require_once("/usr/local/pkg/snort/snort.inc");

        ….

        All thanks!

        P.S. What for guiconfig.inc has been included?  ::)

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          If the file is meant to be accessed using the Web Interface, that include makes sure that a user is prompted for a username and password before they are allowed access to the page.

          If that script is meant to only be run from the CLI, it can have that include removed and it should be moved out of /usr/local/www - perhaps to /usr/local/bin - so that it cannot be accessed via the web without authentication. Otherwise, anyone who is allowed to hit the WebGUI port could trigger that script.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

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

            Clearly, root through cron refresh rules cannot.
            We will be refreshed therefore through webgui.

            Thanks!

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