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

    Adding my own Snort rules to custom.rules via command line

    Scheduled Pinned Locked Moved IDS/IPS
    2 Posts 2 Posters 689 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.
    • I
      ineedhelp
      last edited by ineedhelp

      I know that I am able to add custom rules into pfSense Snort via the text box. However, I am required to automate the uploading of a huge number of custom rules (hence requiring the use of the command line).

      I am able to copy my rules from a Linux machine into the pfSense box as 'custom.rules' for the interface via the command line. However once I restart Snort, the custom rules are "overwritten" and becomes a blank file again. Do I have to do some other form of configuration?

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

        There is nothing to do unless you want to modify the Snort section of the config.xml file on the firewall and stuff the custom rules in there as Baee64 encoded text. The package always rewrites its configuration files from scratch each time the binary is started or restarted. Any customizations you make at the OS level are overwritten as you observed.

        The package is not designed for CLI interoperability. It has a GUI interface. If you want a pure CLI interoperable Snort installation, then abandon the pfSense GUI package and install the binary Snort package and do all the configuration by hand via the command-line.

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