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

    Suricata - log management option not set on fresh install

    Scheduled Pinned Locked Moved IDS/IPS
    3 Posts 2 Posters 260 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.
    • G
      Graham.Collinson
      last edited by

      It looks as though the log management option isn't set on a fresh install. 'enable_log_mgmt' isn't set in the config anywhere but the default when viewing the log management tab in the gui has this option ticked.

      Is this something that needs to be included in suricata_migrate_config.php?

      1 Reply Last reply Reply Quote 0
      • bmeeksB
        bmeeks
        last edited by bmeeks

        Log management is something that is left disabled by default as some users may want to keep all logs for an indefinite amount of time. Granted this is not the best choice, but I thought it better to allow each admin to decide for themselves.

        If the option is showing as "default enabled" on the LOG MGMT tab, then it is possibly the result of checking for the wrong value "on" versus "yes", for example. I've fixed some of those in the distant past I believe.

        Edit: yep, I took a quick look in the PHP source for the suricata_logs_mgmt.php file and see a logic error in this line:

        // Grab saved settings from configuration
        $pconfig['enable_log_mgmt'] = config_get_path('installedpackages/suricata/config/0/enable_log_mgmt') == 'off' ? 'off' : 'on';
        

        That line should instead read like this:

        // Grab saved settings from configuration
        $pconfig['enable_log_mgmt'] = config_get_path('installedpackages/suricata/config/0/enable_log_mgmt') == 'on' ? 'on' : 'off';
        

        The incorrect line will interpret "blank" or an empty parameter the same as "on" when it should instead interpret anything other than an explicit "on" string the same as "off". I will create a Redmine Issue for this and also add it to my internal TODO list.

        1 Reply Last reply Reply Quote 0
        • bmeeksB
          bmeeks
          last edited by

          Here is the Redmine Issue for this bug: https://redmine.pfsense.org/issues/15744.

          Thank you for reporting it.

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