• Great Site for Helping Write Custom Suricata Rules

    Pinned
    1
    3 Votes
    1 Posts
    2k Views
    No one has replied
  • This topic is deleted!

    Pinned
    1
    6 Votes
    1 Posts
    2k Views
    No one has replied
  • 8 Votes
    74 Posts
    87k Views
    bmeeksB
    @Snailkhan: It is not possible in pfSense to tie IDS/IPS rules or policies to the pf firewall engine. Thus it is impossible to tie IDS/IPS rules to IP source or destination pairs as evaluated by the firewall engine. That's just not how pfSense is designed. If you need this level of granularity, then pfSense is not the product for you. The best you could do is write your own custom IDS/IPS rules where you customize the Source/Destination fields of each IDS/IPS rule. I seriously doubt you want to get into that level of maintainence. Snort is an add-on volunteer-maintained package for pfSense. It is not baked into the operating system nor into the design of the firewall. Therefore its capabilities will be nowhere near as flexible as say a customized Cisco hardware/software solution might be. Later Edit: but compare the price you pay for pfSense and its Snort package to what the Cisco solution costs you . Many times compromises are necessary when taking advantage of the "free" option.
  • 7 Votes
    4 Posts
    21k Views
    bmeeksB
    @gwaitsi said in Configuring pfSense/netmap for Suricata Inline IPS mode on em/igb interfaces: is it necessary to have on all interfaces, or just the ones assigned to suricata? Just the ones assigned to Suricata. But the general consensus these days with the super fast multicore CPUs most users have is that you should just disable all hardware offloading on all interfaces. It was helpful back in the days of Pentiums struggling to achieve line rate packet processing, but today's multicore CPUs generally don't break a sweat until you get to the 10 Gig area. There are several things (including some third-party packages) that can be negatively impacted by hardware offloading.
  • Quick Snort Setup Instructions for New Users

    Pinned
    147
    5 Votes
    147 Posts
    332k Views
    bmeeksB
    @qinn, it depends totally on which precise rules are enabled and what the traffic on your network actually consists of. The goal in IDS/IPS is to get no or very few alerts and blocks. That means your network is relatively secure and clients are following the rules ... . I don't mean that to say you should never get alerts, though. Just that you don't want to be receiving hundreds per hour. Once blocking is enabled that might drive you crazy as an admin. Within the IPS Polices, the Snort team has selected rules that provide security without a ton of false positive alerts.
  • 8 Votes
    4 Posts
    19k Views
    bmeeksB
    @cyberzeus said in How Automatic SID Management and User Rule Overrides Work in Snort and Suricata: bmeeks - I found the following link that describes what is included in each of the 3 IPS policies.  Note there is a 4th policy - MaxDetect.  Do you know if there are any plans to implement this in the Snort package for pfSense? https://www.snort.org/documents/215 Replying to an old thread, but the answer is "yes". The new MaxDetect policy is now present and selectable in the Snort and Suricata packages. Just remember that the Snort folks recommend enabling that only for testing purposes! It is most definitely not recommended for a production network. It will generate a lot of false positives!
  • Important Info About Passlists with Suricata Inline IPS Mode

    Pinned
    2
    1 Votes
    2 Posts
    10k Views
    SteveITSS
    For those looking to create their own rules, the "sid:1000006;" part of the example is NOT a reference to an existing SID. It needs to be a unique number otherwise Suricata won't load the rule. To whitelist for a rule for an IP, search for the SID in /usr/local/etc/suricata/suricata_(interface)/rules/suricata.rules. Duplicate the conditions like "flow:from_server,established; content:"403"; http_stat_code;" into the custom rule so it matches, like pass ip 192.168.1.22/32 80 <- any any (msg: "Pass List Entry - allow all traffic to/from 192.168.1.22/32"; flow:from_server,established; content:"403"; http_stat_code;sid:1000006;) Otherwise with only the IP address, port, and unique SID it will allow all traffic for that IP. Also note the directional (<-) only allows for two directions..."both" or "left."
  • About the New Block-on-Drops Only Option in Suricata 4.0.0

    Pinned
    12
    3 Votes
    12 Posts
    19k Views
    bmeeksB
    @JasonAU: You put a lot of effort into this forum & Pfsense thank you! Seriously a lot of people would be lost without somebody doing the answering on the forum I’m having a lot of fun toying with this after work in my lab the only thing that I don’t currently understand is can I make some rules drop rather than block when I’m configured with: *Legacy mode not inline *Block on DROP only enabled *IPS Policy Security with ‘policy’ mode Snort Subscriber + ET Let’s say I like one of the rules FILE tracking GIF (1x1 pixel) from the files.rules category sounds like a good thing to help with privacy but the blocking action causes problems as often the IP that gets blocked is hosting other legitimate images in the page, Can I use SID Management to modify this rule to drop even when I have block on drop enabled? Your question leads me to believe you are misunderstanding a key piece of the puzzle.  There is no difference between DROP and BLOCK in Legacy Mode.  They are the same thing.  Both lead to the exact same result:  traffic from the offending IP address (the one that triggered the rule) is blocked by placing the SRC, DST or BOTH IP addresses from the offending packet into the snort2c pf firewall table.  After that, all further traffic from those IP addresses is blocked until the IP addresses are removed from the snort2c table.  Legacy Mode can't do what you want.  The whole reason I created the new "Block-on-drops-only" option was so you can tailor rules actions to get the results you desire.  See, all rules by default from the rule set vendors come with the action set to ALERT.  With Legacy Mode Blocking, and before the new "Block-on-drops-only" option was added, any alert also generated a corresponding block.  It was an all or nothing arrangement.  When you enabled blocking, any rule that generated an alert would also cause a block.  With the new "Block-on-drops-only" option, I added some extra intelligence within the custom blocking module so that it could look at the rule action (ALERT or DROP) of the triggered rule and take the action specified.  So if the rule says ALERT, then only an alert is generated but no block is created.  If the rule says DROP, then both an alert and a block are generated. SID MGMT has options that allow you to alter rule actions from the default value of ALERT.  So now you can pick and choose which rules you want to just alert and which you want to drop (or block traffic).  This new "Block-on-drops-only" option was born out of the way the Inline IPS mode operates.  With Inline IPS Mode, you must specifically change rule actions to DROP in order to drop or block traffic.  You could also leave some rules with the default ALERT action and those rules would generate alerts but would not block or drop traffic.  That's the way most commercial proprietary Intrusion Prevention Systems operate.  So I thought it would be useful to port that same functionality (the choice of ALERT or DROP) over to Legacy Mode operation.  Hence the new "Block-on-drops-only" option. I still don't want folks to confuse Legacy Mode's use of DROP with the way IPS Mode works, though.  In Legacy Mode, even though I'm using the term "drop", the actual blocking of traffic is done the old way using libpcap to get copies of every packet traversing the interface, and when a rule fires to create a block, the IP addresses from the offending packet are copied to the snort2c table in pf to implement a firewall block.  So when I say "drop" in the context of Legacy Mode and the new "Block-on-drops-only" option, I really mean that only rules with DROP as the action will add the offender's IP address to the snort2c table.  The "drop" is really still the old fashioned block.  With Inline IPS Mode, the snort2c table is not used at all.  There is another Sticky Post here on the forum that describes the difference between Legacy Mode and Inline IPS Mode. Read both of the Sticky Posts in this forum about Passlists and Suricata.  Each of them also contains some key points about blocks, drops and Legacy vs Inline IPS modes. Bill
  • Using Snort VRT Rules With Suricata and Keeping Them Updated

    Pinned
    11
    3 Votes
    11 Posts
    36k Views
    M
    @bmeeks said in Using Snort VRT Rules With Suricata and Keeping Them Updated: @MxcZXAKM said in Using Snort VRT Rules With Suricata and Keeping Them Updated: @bmeeks So is this the best release to reference for now? snortrules-snapshot-29160.tar.gz Yes. You want to use the most current version of the Snort 2.9.x rules with Suricata. Since Snort 2.9.16 is the current release, then the snortrules-snapshot-29160.tar.gz rules archive contains the latest ones. Very helpful, Thank you!
  • Snort's SSH_PORTS default value showing 55??

    ssh snort port config 4.1.6-13
    1
    0 Votes
    1 Posts
    28 Views
    No one has replied
  • Snort: Emerging Threats Open rules download failure

    5
    0 Votes
    5 Posts
    383 Views
    M
    @edbuilder Thanks, agreed, package is now EOL and not much I can do. At this stage I will wait to see the new pfSense release, which may be the solution to my issues.
  • 0 Votes
    1 Posts
    114 Views
    No one has replied
  • Snort3 Package Status Update

    14
    7 Votes
    14 Posts
    2k Views
    bmeeksB
    @InstanceExtension said in Snort3 Package Status Update: @bmeeks Thanks for all of your efforts with this package! I hope you stick around as your institutional knowledge is still very valued. I'm confused as you said that Snort3 will be built into Nexus, but it is really just built into Threatgate instead? If so, do you know if a user can enable just Snort3 and nothing else in Threatgate? I already use PiHole for DNS filtering and my AD Domain controllers for Windows DNS in my environment, so I have little to no use for what it looks like Threatgate might offer other than Snort3. Thoughts? No, Snort3 is not part of Threatgate. Those are two separate things. The relationship between Snort3 and Nexus is, I believe, the GUI part. I don't know because I have neither installed nor tested Snort3, but I assume the GUI for Snort3 is done in Go which is the language tool used for the new pfSense Plus Nexus GUI. I think that is why you must enable Nexus to be able to install and use the new Snort3 package on Plus. I assume also, based on the announcement about Plus and CE merging into a single product in the next release, that Snort3 will become available to all. Theatgate is more of a replacement for pfBlockerNG as it is hailed as pfBlockerNG "and then some" according to some replies on Reddit about this topic.
  • suricata crash report

    2
    0 Votes
    2 Posts
    128 Views
    SteveITSS
    @vmaxx I recall that being an issue a while back. Try upgrading to 2.9 and/or applying patches in System Patches.
  • Crash Report PHP Fatal Error

    5
    0 Votes
    5 Posts
    357 Views
    bmeeksB
    @MrWhatZitTooya666 said in Crash Report PHP Fatal Error: @bmeeks which log file is it that I delete of stuff from From the text of the error message you posted, it appears you were using the Logs View tab to view some particular log. The logs available on that tab are alerts, blocks, eve.json, files-json, http, sid_changes, stats, suricata, and tls. You would have selected one of those files to view and that triggered the error. So, whichever file you attempted to view that caused the error is the one you need to prune.
  • Suricata Host OS Policy GUI uses mac-os instead of macos

    2
    0 Votes
    2 Posts
    170 Views
    J
    Attached is the patch I tested on pfSense CE 2.9.0. It changes the GUI value from mac-os to macos. System Patches settings: Path Strip Count: 0 Base Directory: / Ignore Whitespace: unchecked Run Debug before applying. I enabled Auto Apply after verifying it worked. The patch doesn’t update existing configurations. On each affected interface’s Flow/Stream tab, edit any Host OS Policy entry whose target policy is still mac-os, select Mac-OS again, and save the entry. Then save the Flow/Stream page to regenerate the YAML. Entries already using macos don’t need changing. suricata-macos-gui.patch
  • Suricata

    3
    0 Votes
    3 Posts
    326 Views
    bmeeksB
    Many of the Suricata STREAM EVENTS rules will generate false positives. Those rules are primarily informational and not necessarily indicative of malicious intent. My recommendation was to always disable the EVENTS rules (there are several categories of them that ship installed by default with Suricata from upstream). When the Suricata package is reinstalled or updated on pfSense (which is basically a reinstall as well), the default supplied EVENTS rules are automatically enabled. This was done to make sure any new EVENTS rules were made available, but an unfortunate side effect is any manual disabling the admin had previously configured on the RULES tab was lost in the update. To make changes to the EVENTS rules permanent, use the SID MGMT tab features. SID management configuration runs with each startup of Suricata, and rules disabled there remain disabled and won't get "default enabled" again with package updates.
  • 0 Votes
    2 Posts
    339 Views
    T
    Subject: Additional troubleshooting / possible root cause found for Snort Portscan Detection preprocessor not generating portscan alerts Good day from Singapore, Reporter: Mr. Turritopsis Dohrnii Teo En Ming Date: 22 Sep 2026 Tuesday 7.15 pm Country: Singapore I performed further testing on pfSense CE 2.9.0 with Snort package 4.1.10 / Snort 2.9.20_9. The sfPortscan preprocessor itself is correctly generated in the WAN snort.conf: preprocessor sfportscan: scan_type { all } proto { all } memcap { 10000000 } sense_level { high } ignore_scanners { $HOME_NET } Stream5 is also enabled: track_tcp yes track_udp yes The generated file: preproc_rules/preprocessor.rules contains the sfPortscan GID 122 rules, including: gid: 122; sid: 1 PSNG_TCP_PORTSCAN gid: 122; sid: 5 PSNG_TCP_FILTERED_PORTSCAN gid: 122; sid: 21 PSNG_UDP_FILTERED_PORTSCAN However, the generated snort.conf does not define PREPROC_RULE_PATH, does not include preprocessor.rules, and does not contain config autogenerate_preprocessor_decoder_rules. The normal rule includes are only: include $RULE_PATH/snort.rules include $RULE_PATH/flowbit-required.rules include $RULE_PATH/custom.rules I also checked those three included rule files for gid: 122, and none contained any GID 122 rules. Controlled test I created a test configuration and added: var PREPROC_RULE_PATH preproc_rules and: include $PREPROC_RULE_PATH/preprocessor.rules snort -T then successfully validated the configuration: Snort successfully validated the configuration! Snort exiting I then stopped only the WAN Snort process, added the same two lines to the generated WAN snort.conf, and started Snort directly using the same command line normally used by pfSense, so that pfSense would not regenerate snort.conf. /usr/local/bin/snort -R _44907 -M -D --daq pcap --daq-mode passive --treat-drop-as-alert -l /var/log/snort/snort_igc044907 --pid-path /var/run --nolock-pidfile --no-interface-pidfile -G 44907 -c /usr/local/etc/snort/snort_44907_igc0/snort.conf -i igc0 After doing this, sfPortscan immediately started generating GID 122 alerts from external scans. Examples: [122:21:1] (portscan) UDP Filtered Portscan [122:5:1] (portscan) TCP Filtered Portscan The same external scanner that previously generated normal Snort Nmap signature alerts but no sfPortscan alerts then generated: [122:21:1] (portscan) UDP Filtered Portscan Therefore, my testing suggests that sfPortscan itself is functioning, but its GID 122 rules in preproc_rules/preprocessor.rules are not being loaded by the pfSense-generated Snort configuration. Another observation is that starting Snort normally from the pfSense GUI regenerates snort.conf and removes the manually added PREPROC_RULE_PATH and include $PREPROC_RULE_PATH/preprocessor.rules lines, after which the workaround is lost. I reproduced the original failure with both Max-Detect and Security IPS policies, so the problem does not appear to be specific to Max-Detect. Could the Snort package maintainer please check whether preprocessor.rules should be included/processed when generating the interface snort.conf? Ordinary Snort Nmap signatures were working before the workaround. That proves the failure wasn't caused by traffic failing to reach Snort. For example, I had ET SCAN NMAP OS Detection Probe alerts while GID 122 remained completely absent. My experiment demonstrates that loading preprocessor.rules restores GID 122 alerts; the package maintainer can determine why the generated Snort configuration isn't loading/processing those rules and what the correct permanent fix should be. Thank you very much. Regards, Mr. Turritopsis Dohrnii Teo En Ming Republic of Singapore 22 Sep 2026 Tuesday 7.34 pm Singapore Time
  • 0 Votes
    2 Posts
    201 Views
    bmeeksB
    Snort 2.9.20 is extremely old and the underlying binary is no longer really supported by the upstream Snort team. The problem you describe is very likely to be an error in the logic of the C source code within the binary piece of the Snort package. Snort on pfSense CE is actually two related but distinct packages. There is a binary executable piece that runs as a service and does the actual work of traffic inspection and blocking/alerting. On pfSense there is also a custom GUI package written in PHP that provides the unique GUI interface available on pfSense. Snort on most other platforms does not offer a GUI for configuration and the admin instead directly manipulates text-based configuration files. Netgate has chosen to implement the new Snort3 code tree in pfSense Plus with Nexus. That is where future development efforts will be. I expect the current Snort 2.9.x package to eventually just die as there is no longer any maintainer and that code tree is obsolete. Snort 2.9.x is single-threaded whereas the newer Snort3 tree is multithreaded (and also rewritten in C++). Snort3 uses Lua for configuration files. So, a long answer to say I would not expect this issue to be resolved in the old Snort 2.9.x code.
  • 0 Votes
    1 Posts
    103 Views
    No one has replied
Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
Privacy Policy · Cookie Policy