• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 669 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 Jul 31, 2022, 9:19 AM Jul 31, 2022, 9:16 AM

    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
    • B
      bmeeks
      last edited by bmeeks Aug 2, 2022, 12:21 PM Aug 2, 2022, 12:55 AM

      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
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received