Remote Support Start download

OPNsense Suricata IDS/IPS: Tune False Positives Systematically Instead of Just Disabling Rules

OPNsenseSuricataIDS
OPNsense Suricata IDS/IPS: Tune False Positives Systematically Instead of Just Disabling Rules

Anyone running Suricata on OPNsense in production knows that Monday morning: 12,000 alerts overnight, most of it noise, three could be real — and nobody wants to find them. The easy reflex is to disable the loudest SIDs. Two months later the ruleset is Swiss cheese, and when the real incident comes the sensor sees nothing.

This article describes the workflow we have built at DATAZONE over the past years for mid-market OPNsense 25.7 environments running Suricata 7.x. It is not about exotic tricks but about craftsmanship: how to tune false positives (FPs) cleanly without losing detection depth, and how to document why a rule is no longer allowed to raise an alarm in this specific environment. For general ruleset selection see our foundation article OPNsense Suricata: Rule Tuning Without False-Positive Floods — here we focus on the operational practice after that.

OPNsense Suricata false positive tuning: the mindset

A false positive is not simply a wrong alarm. It is a statement about your environment: “In this network, with these clients, with this protocol behavior, this pattern is expected.” Every suppression is therefore environment documentation. If you forget that, you end up with a ruleset nobody understands anymore — worthless at the next audit or handover.

The systematic approach differs from reflexive disabling in three ways:

  • Priority before blanket action: Not every loud rule is irrelevant. ET POLICY signatures are often noisy, but one of them might catch the single occasion the intern starts OpenVPN against policy. Prioritise instead of deleting.
  • Local instead of global: A suppression tied to a known scanner host in the monitoring VLAN is far more precise than disabling the SID globally.
  • Reasoned instead of silent: Every suppression gets a reason in the config. Without that you lose all overview after six months.

Setting rule priorities: split alerts into classes

Suricata emits a priority value (1 to 4, 1 is highest) with every rule hit. The default priority is assigned via the classtype mapping in classification.config. On OPNsense that file lives under /usr/local/etc/suricata/classification.config and is re-read on service reload.

For FP tuning it is critical to adapt the classtypes to your own environment. We work with four alert classes:

ClassPriorityExample classtypesHandling
Critical1trojan-activity, exploit-kit, targeted-activityImmediate alert, ticket, analyst review
High2web-application-attack, successful-user, policy-violation-sensitiveDaily review, context check
Medium3network-scan, policy-violation, misc-attackWeekly report
Low4not-suspicious, info, protocol-command-decodeSIEM archive only, no alert

The actual classtype-to-priority mapping is done via classification.config overrides, not by rewriting the rules themselves. That survives every rule update cycle. On OPNsense we create a dedicated file under /usr/local/etc/suricata/opnsense.classification.config and reference it in the GUI under Services -> Intrusion Detection -> Advanced -> Classification Config.

Why not just change priority in the rule file?

Because .rules files are overwritten on every ET Open update. Priority overrides via the classification file are persistent and central. If you patch inside .rules files, you patch three times a week. We have taken over environments where this was done for years — and nobody knew which rule was original and which had been tinkered with.

Writing suppressions your successor can still read

Suricata distinguishes two suppression types in threshold.config:

  • suppress: suppress alerts for this SID/host combination; the rule keeps running.
  • threshold: let alerts through, but only at a certain frequency or once per time window.

On OPNsense the file lives at /usr/local/etc/suricata/threshold.config. The GUI lets you add suppressions per interface, but production environments quickly end up with a maintained text file with comments.

Examples from a real mid-market setup

# SID 2013504 -- ET POLICY DNS Query to a *.pw TLD
# FP: marketing uses pw shortlinks for campaign tracking
# Review: 2026-11-15, next check Q2/2027
suppress gen_id 1, sig_id 2013504, track by_src, ip 10.42.20.0/24

# SID 2027257 -- ET INFO Observed DNS Query to .xyz TLD
# FP: legitimate SaaS services. Not suppressed globally,
# only for known service hosts.
suppress gen_id 1, sig_id 2027257, track by_dst, ip 203.0.113.42
suppress gen_id 1, sig_id 2027257, track by_dst, ip 203.0.113.43

# SID 2029054 -- Office365 traffic
# Instead of suppress: threshold to 1 alert per hour per source
# keeps detection, flattens the volume
threshold gen_id 1, sig_id 2029054, type limit, track by_src, count 1, seconds 3600

Three things these snippets do right:

  1. SID comment in human language. No analyst needs to look up the SID separately.
  2. Reason in the file. Not in the ticket system, not in an email, but where the suppression lives.
  3. Review date. At least once a year every suppression goes back on the table. Environments change, FPs do too.

Whitelist methodology: hosts allowed to be loud on purpose

Not every loud host is an FP problem. Vulnerability scanners, backup clients, monitoring appliances and patch management servers produce legitimate traffic that hits many signatures. For these hosts we work with explicit whitelists rather than SID-wide suppressions.

In Suricata this is solved via address groups in suricata.yaml. On OPNsense we use alias-driven variables:

vars:
  address-groups:
    HOME_NET: "[10.0.0.0/8,192.168.0.0/16]"
    SCANNER_HOSTS: "[10.10.5.10,10.10.5.11]"
    MONITORING_HOSTS: "[10.10.6.20/32]"
    BACKUP_SERVERS: "[10.10.7.0/28]"

The scanner suppression is then written cleanly:

# vulnerability scanner is allowed to scan anything
# but only source-based, not destination-based
suppress gen_id 1, sig_id 2010935, track by_src, ip $SCANNER_HOSTS
suppress gen_id 1, sig_id 2101201, track by_src, ip $SCANNER_HOSTS

Important: these whitelists must never become bidirectional. A compromised scanner host is the perfect pivot in the network. Suppressions are by_src — outgoing traffic from the scanner. Alerts on incoming traffic to the scanner stay live.

Logging categories: split EVE JSON streams by purpose

Suricata writes to eve.json per enabled interface. For production IDS setups that is not enough — the file grows large, SIEM shippers run hot, and you mix flow logs with alerts.

We split EVE streams on OPNsense via multiple outputs entries:

outputs:
  - eve-log:
      enabled: yes
      filename: eve-alerts.json
      types:
        - alert:
            tagged-packets: yes
            metadata: yes
            http-body: no
  - eve-log:
      enabled: yes
      filename: eve-flow.json
      types:
        - flow
        - netflow
      rotate-interval: hourly
  - eve-log:
      enabled: yes
      filename: eve-protocol.json
      types:
        - http:
            extended: yes
        - tls:
            extended: yes
        - dns:
            query: yes
            answer: yes

The benefit: on the SIEM side we can prioritise the alert pipeline, push flow logs to cold storage and load protocol logs only on demand. For the Elastic Stack integration we have described our approach in detail in OPNsense Suricata with Elastic Stack.

Decide HTTP body logging deliberately

http-body: yes is tempting but costs a lot of storage and raises GDPR questions. We only enable it when a specific use case requires it (for example a forensic investigation) and switch it off afterwards. Permanently on is in most SMB networks not just unnecessary but problematic.

Alert workflow: how an alert becomes a ticket and comes back

An IDS is only as good as the workflow processing the alerts. We work in three stages:

  1. Triage (first look): class 1-2 alerts hit the dashboard within minutes and get qualified — real incident, FP candidate or known environmental noise?
  2. Analysis: FP candidates get PCAP context attached. Suricata delivers the packet context via tagged-packets: yes. A suppression is written only after analysis.
  3. Documentation: every new suppression goes into threshold.config with a comment. The review date is set. The ticket is closed with a reference to the config line.

This workflow prevents suppressions from being created “quickly on the side”. Every suppression is a conscious decision with a reason. That is more effort per alert, but after three months you have a ruleset that holds.

Which metrics matter?

We measure four KPIs monthly:

  • Count of class 1-2 alerts (target: as low as possible, but never 0)
  • FP rate in classes 1-2 (target: below 10 percent)
  • Mean time to triage (target: under 30 minutes during business hours)
  • Number of new suppressions per month (should decline, not stay flat)

If the number of new suppressions does not go down over months, either the ruleset is wrong for your environment or the environment keeps changing permanently — both are signals, not reasons to give up.

IPS instead of IDS: what changes when you block

Everything above applies to IDS mode. Running Suricata inline as an IPS requires significantly stricter preparation. Every rule with priority 1-2 that we accepted in IDS mode becomes a potential outage source in IPS. Before switching to IPS we run two weeks of parallel operation and explicitly mark every rule that would have blocked with a review decision.

For environments with a redundant OPNsense firewall in a CARP cluster one more thing matters: rulesets and suppressions have to be identical on both nodes. Config Sync helps, but after every rule update we check explicitly that the secondary has the same number of active SIDs as the primary.

When professional support pays off

Suricata tuning is craftsmanship with a steep learning curve. For SMB environments where nobody is a full-time IDS analyst we offer the tuning as a project: baseline capture, rule prioritisation, initial suppression configuration, documentation and a handover workshop. Afterwards the setup usually runs two to three years before the next major review. More on this and ongoing care under OPNsense Managed Service and in our IT security services for SMBs.

For teams doing this themselves: start small. Ten well-documented suppressions are worth more than 200 undocumented ones. And never disable a rule before you know why it is there.

FAQ on Suricata false positive tuning

How many false positives are typical in an SMB environment?

Right after enabling ET Open rules we regularly see four- to five-digit alert counts per day. After systematic tuning over four to six weeks most environments sit between 50 and 300 real alerts per day, with less than 10 percent in the upper priority classes. Concrete numbers depend heavily on network size, Internet usage behaviour and rulesets — we measure before each project individually.

Should you buy ET Pro or is ET Open enough?

For most SMBs ET Open plus the Abuse.ch feeds is enough. ET Pro brings finer signatures and faster IOC updates but requires somebody who can process the additional alerts. Without that capacity ET Pro just means more noise at the same response quality. For MSSP-backed setups or regulated industries the math changes.

What do you do with alerts you cannot classify?

Do not suppress them. Research first: look up the SID in the rule file, read the metadata, pull a PCAP, get a second opinion. A suppression without understanding is the fastest path to a leaky ruleset. If time is short, park the alert in an “unclear” queue and review weekly — but do not suppress.

How often should suppressions be reviewed?

Every suppression gets a review date when created. At least once a year, earlier when environment-changing projects such as migrations, site expansions or VLAN rebuilds happen. In practice roughly a third of all suppressions drops out at each yearly review because the original reason no longer exists.

What is the difference between suppress and threshold in Suricata?

suppress silences alerts completely — the rule keeps running but produces no entry for the defined hosts. threshold lets alerts through but caps them at a maximum frequency (for example one per hour). For loud but relevant signatures threshold is almost always the better choice because the detection information is preserved.

Is switching from IDS to IPS mode worth it?

Only if the ruleset is cleanly tuned and you have a rollback strategy. Suricata in blocking mode means a faulty or too-generic rule will block production traffic. For critical networks we recommend a phased switch with rule policy applied to subsets and a two-week parallel period before every live activation. See OPNsense hardening in a medical practice for a practical example.

More on these topics:

Need IT consulting?

Contact us for a no-obligation consultation on Proxmox, OPNsense, TrueNAS and more.

Get in touch