When a BPF filter reduces Security Onion sensor load
A BPF filter tells the capture layer which packets to pass to the inspection engines and which to drop before Suricata or Zeek ever sees them. It is the right lever when a sensor is dropping packets under load and the traffic consuming capacity is traffic your detection program has no reason to inspect, such as nightly backup streams or large encrypted bulk transfers between known hosts. Security Onion lists applying a BPF among the ways to reduce Suricata packet loss, alongside tuning the ruleset, max-pending-packets and AF-PACKET threads. For Zeek, the documented guidance for packet loss is to add workers or apply BPF filtering. Both paths exist, so the decision is about which traffic you can afford to lose, not whether filtering is possible.
Treat the filter as a trade-off rather than a free fix. Every packet a BPF drops is invisible to Suricata alerts, Zeek logs and any hunt that depends on them, so a filter that removes a backup network segment also removes the chance to spot exfiltration hidden inside it. Before writing an expression, ask the detection owner which hosts and ports carry traffic that has produced or could produce findings, and confirm in writing which segments will be excluded and for how long. Also confirm which sensor interface the filter applies to, because a filter on one sensor changes only what that sensor sees. Recheck packet loss statistics after the change, since a filter that is too broad creates a blind spot while one that is too narrow only moves the drops elsewhere.
Which traffic is a good candidate for a BPF exclusion
A BPF exclusion removes packets before Suricata or Zeek inspects them, so it buys headroom at the cost of visibility. The candidates below are flows where the detection value given up is usually low, but each one still needs an owner's confirmation that the traffic is what it appears to be.
Scheduled backup flows to known storage
Nightly or weekly backup jobs often move large volumes between a fixed set of backup clients and a storage target. The detection value is usually low, but a compromised backup server can also be used to exfiltrate data. Before excluding, confirm the source and destination hosts are inventoried, the job schedule is documented, and the backup tool's traffic is the only traffic that uses that host pair. Scope the filter to host pairs and ports, not whole subnets.
Suricata docsEncrypted replication between known peers
Database or storage replication between a fixed pair of peers produces sustained encrypted traffic that Suricata cannot meaningfully inspect. The detection value you give up is mostly content inspection of a channel you already trust. Ask who owns the peers, whether the replication certificates are managed, and whether a peer change would be noticed. A filter that matches only the replication port and the two peer addresses leaves the rest of the network visible.
High-volume internal streams with low value
Telemetry, metrics scraping, or log shipping between internal servers can generate a large share of packets with few security-relevant events. Excluding them can recover significant sensor capacity. Before excluding, check whether these streams have ever produced an alert or an investigation lead, and whether the same data is already collected through another source such as host logs. Document the decision so the next analyst does not reopen it without context.
Vendor update and patch downloads
Software update traffic from known vendor mirrors is large, predictable, and often over HTTPS. The detection value is limited, but an attacker can imitate update traffic to hide a download, so the exclusion must name the mirror addresses and not general web traffic. Confirm that updates are pulled through a managed proxy or a fixed mirror, and that a change in the mirror address would trigger a review of the filter.
Traffic from the management and monitoring hosts
Hosts that run scanners, vulnerability assessments, or the grid's own health checks generate traffic that looks hostile and fills the alert queue. Excluding this traffic reduces noise, but it also hides the one place where a rogue scanner would look like the authorized one. Ask whether the scanner hosts are on an allowlist, whether their activity is logged elsewhere, and whether a separate rule can flag any traffic from them that falls outside the scheduled windows.
Options for cutting sensor load and how each fits
A Berkeley Packet Filter expression tells the capture layer to discard matching packets before Suricata or Zeek inspects them. It suits traffic that is high in volume, has clear source and destination addresses or ports, and has little detection value, such as scheduled backup streams or bulk transfers between fixed hosts. The cost is that anything the filter drops is invisible to every rule, log and hunt that depends on that sensor.
- Best fit: high-volume flows that are well defined by addresses or ports and documented as low risk.
- Visibility cost: a filter cannot tell a compromised backup host from a healthy one, so dropped traffic leaves no network record.
- Check first: confirm with the flow owners that the traffic matches what you believe, and confirm the filter covers both directions.
- Verify: test the expression on one sensor and compare packet counts and alert output before a grid-wide change.
- Exfiltration risk: an encrypted bulk transfer can also carry data out of the network, so the filter may hide that channel too.
Review the BPF guidance in the Suricata documentation and record who approved each exclusion and why.
Ruleset tuning reduces the inspection work per packet by enabling fewer signatures or disabling rules that produce noise in your environment. It suits sensors where the rule load is the constraint, or where rules fire on protocols and products your network does not use. The cost is that each disabled rule is a detection you no longer get, even when the traffic it watches is present on the wire.
- Best fit: sensors with many enabled rules for products or protocols that are absent from the network.
- Visibility cost: a removed rule removes coverage for that technique for every sensor where it applies.
- Lighter option first: where the goal is fewer alerts rather than less work, suppression or thresholding changes the output without removing the signature.
- Check first: identify which rules contribute most to the load, then map each candidate to a threat you still need to detect.
- Record each change: keep a note with the reason for every disabled rule so a later ruleset update or rebuild does not silently repeat or reverse the decision.
Before disabling anything, confirm that the traffic a rule watches is not seen by a sensor you have not yet reviewed.
The max-pending-packets setting controls how many packets Suricata can hold in its queue while the inspection threads work through them. A larger queue absorbs short bursts that briefly outrun processing, which can reduce drops on a sensor that is otherwise keeping up. It does not make a slow sensor faster. If processing is consistently behind, the queue fills later and the drops still occur.
- Best fit: short bursts of traffic that overrun inspection on a sensor that is otherwise healthy.
- Visibility cost: no traffic is dropped by design, but a larger queue delays alerts and uses more memory.
- Check first: confirm whether packet loss is steady or bursty by reviewing Suricata's statistics over time.
- Memory headroom: queued packets consume RAM, so confirm the sensor has room after the change.
- Limit: if drops happen continuously, this setting postpones them and the underlying capacity problem remains.
Compare drop counters and memory use before and after any change, using the packet loss guidance in the Suricata documentation.
The AF-PACKET capture method on Linux reads packets from the network interface through threads, and the thread count sets how many of them read in parallel. Adding threads spreads the capture work across cores so that one thread is not the bottleneck. The gain depends on how traffic is distributed across those threads, and the extra threads consume CPU that inspection and other services also need.
- Best fit: sensors with spare cores where a single capture thread is the limit.
- Visibility cost: traffic is still inspected, so the change does not remove coverage, but CPU shared with rules and other services is reduced.
- Check first: whether cores are idle or saturated during the drops, and whether threads are competing with other processes.
- Change one value at a time: compare drop counters over a representative period after each step.
- Shared cores: Zeek workers and other sensor services draw on the same cores, so a thread increase can move the problem rather than solve it.
Confirm the sensor's CPU profile first, then review the AF-PACKET settings in the Suricata documentation before editing the configuration.
The Zeek documentation lists more workers or BPF filtering as the ways to address Zeek packet loss. Adding workers spreads Zeek's analysis across more processes, which suits a sensor where Zeek is the component losing packets while Suricata is healthy. It adds capacity instead of removing traffic, so the visibility trade-off is smaller than with a filter, but the hardware cost is real.
- Best fit: Zeek logs show loss while Suricata is keeping up, and free cores are available.
- Visibility cost: none from the change itself, since all traffic remains inspected.
- Check first: the sensor's core count, memory and current Zeek packet loss figures.
- Plan the split: Suricata and Zeek share the same hardware, so add workers only where headroom exists for both.
- Hardware floor: the hardware documentation lists 4 cores and 12 GB RAM as the minimum for a sensor, so an undersized sensor may need more hardware before tuning helps.
If the sensor is under-provisioned, a BPF filter or a larger sensor may be the more direct fix, so compare options before changing worker counts.
How to apply and verify a BPF filter safely
This sequence moves a BPF exclusion from a measured packet loss problem to a verified change, so you drop only the flows the owners agreed to exclude and keep every other detection running. Each step ends with a check you can record before moving on.
Measure packet loss on the sensor
The sensor owner records the current packet loss for Suricata and Zeek on the affected sensor under normal load, using the statistics and logs that the Security Onion Suricata and Zeek docs describe. Keep the figures and the time window, so you can compare them after the change. The step is done when you have a baseline that shows which engine is losing packets and how often, because a BPF filter only makes sense if the loss is real and traceable to traffic you can name.
Define excluded flows with their owners
The network team and the owner of each flow list the exact traffic to exclude, such as a backup server sending to a specific destination port or a bulk transfer between two known hosts. Each entry needs a source, destination, port and protocol, plus a named owner who confirms the flow carries no content your detections need. The step is done when every excluded flow has a signed-off line in your change record, and anything without an owner stays in the capture.
Write and test the expression offline
Write the BPF expression and test it on a non-production sensor or against a captured PCAP that contains the target traffic, using a tool such as tcpdump to confirm which packets match. Check that the expression matches only the agreed flows and that unrelated traffic, including the same hosts on other ports, still passes. The step is done when the test capture shows the expected packets dropped and every other packet kept, and you have recorded the result.
Review what the filter hides from detections
Before the change reaches production, the detection owner reviews which alerts, protocols and log types the excluded flows would have produced and confirms that losing them is acceptable. Note any detections or hunting workflows that depend on that traffic, such as file extraction or certificate logging, and decide whether they need another source. The step is done when the accepted blind spots are written down with the owner's approval.
Apply the filter through the manager
Add the expression through the Security Onion configuration that the manager distributes to sensors, using the configuration key and apply command confirmed in the Security Onion docs for your installed version. Apply it to one sensor first, then to the rest of the grid if the first result is clean. The step is done when the sensor reports the new configuration as active and the change is recorded with the expression, the version and the time it took effect.
Recheck packet loss after the change
Repeat the measurement from the first step over a comparable traffic window and compare the Suricata and Zeek loss figures with the baseline. Confirm that the loss has fallen where you expected, and that no new loss appears on other engines or interfaces. The step is done when the before and after figures are recorded and the loss is at an acceptable level for the sensor owner.
Confirm excluded flows and detections
Verify in the Security Onion Console that traffic from the excluded flows no longer appears, and that a set of known test alerts from other flows still fires as expected. Keep the test set small and documented so the check can be repeated after upgrades or rule changes. The step is done when the excluded flows are absent, the test detections are present, and the result is signed off by the detection owner.
Packet loss versus blind spots: the trade-off to decide
Dropping packets silently degrades detection everywhere, while a BPF filter creates a blind spot you choose. When a sensor cannot keep up, Suricata and Zeek lose packets without raising an alert about what they missed, so every rule and every log source gets a little weaker at once and nobody can say which detections were affected. A BPF filter is different. It removes a named class of traffic before the engines see it, so the gap is known, bounded and can be written down. The decision is not whether to filter but whether the gap you are accepting is one you can defend to an auditor and explain to an analyst.
Filtering out a flow also means anything that rides inside that flow is invisible. An attacker who knows that backup traffic on a particular port or subnet is excluded can move laterally or exfiltrate data through that path without Suricata or Zeek seeing a payload. Before you add a filter, list the hosts and ports it touches, ask who can originate traffic there, and decide whether a compromised backup server should be trusted by default. Encrypted bulk transfers still reveal metadata such as source, destination, timing, volume and session duration, so a narrower filter that keeps connection-level records may preserve more of the investigative value than dropping the flow entirely. Confirm what your sensor still logs for the flows you exclude before you assume they are gone.
Record each filter as a decision with an owner, the exact BPF expression, the sensor it applies to, the reason, the traffic it removes, what detections it weakens and the date it was reviewed. Keep this record next to your NIDS override backups so that rebuilds do not quietly remove or keep filters nobody remembers approving. Analysts need the same list so they do not treat an empty result as proof that nothing happened. Review the register whenever the ruleset, network layout or sensor hardware changes, and check the sensor's packet loss figures after each change to confirm the filter achieved what the record says it does.
Security and operational risks of excluding traffic
Every BPF filter that drops traffic also removes it from detection, hunting and evidence. The cards below cover the risks that follow from that trade-off and the control you should put in place for each one before a filter goes live.
Attackers using excluded paths
Once a traffic class is excluded, an attacker who knows the rule can route command traffic, exfiltration or lateral movement through the same port, host or protocol. A backup or bulk transfer exclusion is a predictable path for that behavior. Review each excluded flow against threat models, and confirm which excluded traffic still reaches Zeek or Suricata through a narrower rule or a sampled path.
Suricata docsFilter drift after network changes
A filter written for last year's backup subnet or storage VLAN can silently match nothing, or match far more than intended, after a re-IP, a new data center or a migration. Nothing in the console shows that a filter has stopped doing its job. Schedule a review of every BPF expression against current addressing whenever network changes are approved, and record the owner of each filter.
Undocumented blind spots
Teams often remember why a filter exists but not what it removed from view. Analysts who later hunt for activity in that segment may conclude nothing happened when the sensor never saw it. Keep a register that states the filter text, the traffic it drops, the reason, the approver and the date. Link each register entry to the change record so the blind spot is visible to anyone reading an alert gap.
Filters applied on one sensor only
In a grid with several sensors, a filter added on one node changes what that node sees, while identical traffic on other sensors is still inspected. Alerts and hunts then differ by sensor, and a detection can appear to fire in one location and not another. Confirm which sensors carry each filter, and check that the sensor configuration is managed centrally rather than edited by hand on individual nodes.
Exclusions that hide a misconfigured host
A broad exclusion can hide a host that is sending unexpected volume, using the wrong protocol or talking to an unknown destination. The traffic that would reveal the misconfiguration is the same traffic the filter removed. Before excluding a host or subnet, capture a baseline of its flows, and keep a lightweight check, such as periodic flow counts from a sensor that still sees that segment, to confirm the host still behaves as expected.
Loss of evidence for investigations
When an incident involves an excluded segment, the packets needed to reconstruct events may not exist. Investigators can then lose the ability to confirm or rule out data movement, which affects scope and notification decisions. Decide in advance which excluded traffic still needs metadata or session records, and confirm with your legal and incident response teams what evidence they require for each segment before you drop it.
Questions teams ask before filtering Security Onion traffic
Is a BPF filter the first fix for Security Onion packet loss?
No, usually it is one of several options and rarely the first step. Security Onion lists applying a BPF among the ways to reduce Suricata packet loss, alongside tuning the ruleset, max-pending-packets and AF-PACKET threads. For Zeek, the documented options are adding workers or applying BPF filtering. Start by confirming where loss occurs and which sensor component is dropping packets, then review the ruleset and sensor sizing before you narrow what the sensor sees. A filter removes traffic from inspection, so it should be a deliberate decision after the cheaper fixes have been checked.
How much effort does a BPF change and its review take?
The effort depends on how many traffic classes you exclude, how well your network team documents the flows, and how many sensors must match. Each filter needs an owner, a written justification, a test on a sensor or a lab copy, and sign-off from the people who accept the blind spot. A single filter on one sensor is a small change. A set of filters across a distributed grid, with Suricata and Zeek each configured separately, takes longer because each sensor and each engine needs its own review. Ask any provider for a written scope that lists sensors, engines, filters and the review steps before they quote.
What does the security team and the network team need to provide?
The network team usually supplies the traffic map: source and destination ranges, ports, protocols, and where backups and bulk transfers cross the sensor. The security team decides which traffic is acceptable to leave uninspected and records the risk. Both teams must agree on what a blind spot means for detections, incident response and any compliance evidence that depends on network visibility. Without this shared input, filters tend to be written from guesses, which is the most common source of later surprises.
Can an internal team make this change without a partner?
Yes, if the team has Security Onion administration experience, access to the sensors and a way to test changes before they reach production. The work is mostly configuration and review rather than new software. The risk is in the decision: an internal team that excludes too much traffic can leave a gap no one notices until an investigation needs the data. Many teams keep the change in house and bring in outside help only for the traffic analysis or for a review of the final filter set. Confirm your own skills and test capacity before deciding.
How do you test a BPF filter before it goes live?
Test the filter against captured traffic first, then against a sensor in a controlled window. Confirm that the excluded traffic matches what you intended, and that traffic you need to keep still reaches Suricata and Zeek. Check packet loss counters and alert volume before and after the change, and record the results. Testing should cover both the filter syntax and the operational effect, because a filter can be valid and still drop something important. Keep the test evidence with the change record so reviewers can see what was verified.
How do you revert a BPF filter if it causes problems?
Keep the previous configuration in version control or another managed record, so the filter can be removed or restored quickly. Document the trigger for rollback, such as a missed detection, an unexpected drop in logs or a change in packet loss, and who has authority to make the call. Confirm how your Security Onion deployment applies configuration changes across the grid, and test the rollback path before you need it. A reversible change with a named owner is far easier to approve than one that can only be undone by rebuilding a sensor.
What is the main trade-off between packet loss and blind spots?
Filtering reduces the load on the sensor, which can lower packet loss, but every excluded flow is no longer visible to Suricata or Zeek. Packet loss means the sensor missed data it was meant to see, so it can hide attacks too. Excluding backups or encrypted bulk transfers may be reasonable, yet those flows can also carry data exfiltration or lateral movement. Weigh each exclusion against the detections you rely on and the evidence you must produce. Record the accepted blind spot so that analysts and auditors know what the grid does not cover.
Decision path from packet loss to an approved BPF filter
The path starts when a sensor reports packet loss in Suricata or Zeek. Before any filter is written, the team checks ruleset and buffer tuning, since Security Onion lists BPF among several loss-reduction options. Only traffic with low detection value moves on: the blind spot is documented with its owner, the expression is tested, and the filter is applied across the grid, then loss and detections are verified and the filter is reviewed on a schedule.
Steps from observed packet loss to a reviewed, documented BPF filter.
How DeployOpen scopes and delivers sensor tuning work
DeployOpen treats BPF filtering on Security Onion sensors as a scoped engineering change, not a one-line config edit. We start from what your sensors drop today, what each excluded flow would have shown, and which packet loss symptoms you are trying to fix. The written scope then sets out the filters, the test method and the handover.
How we scope
- Inventory sensor packet loss metrics and the traffic classes you want to exclude, such as backups or bulk encrypted transfers.
- Record which sensors, interfaces and Suricata or Zeek instances the BPF change applies to, and which stay fully inspected.
- Agree in writing which blind spots are accepted, who signs off on them and how each exclusion will be reviewed.
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we build
- Write and test BPF expressions against captured traffic from your environment before applying them to any production sensor.
- Pair each filter change with the packet loss measurements taken before and after, so the effect is visible rather than assumed.
- Adjust related settings such as the Suricata ruleset, max-pending-packets, AF-PACKET threads or Zeek worker count where the filter alone is not enough.
- Apply changes through your normal change process on a staged sensor first, with rollback steps written before the change.
How we hand over
- Deliver a document listing every BPF expression, its interface, its owner, its business reason and the traffic it no longer inspects.
- Include the test captures, measurement results and the rollback procedure so your team can repeat or reverse each change.
- Walk your analysts and sensor operators through the blind spots so they know what will not appear in alerts or Zeek logs.
- Set a review date for each exclusion, so filters are revisited when backup schedules, cloud services or network paths change.
How we support
- Recheck sensor packet loss after changes and after major Security Onion upgrades, since sensor behavior can shift between releases.
- Ongoing support, upgrades and continuous testing are available as a retainer, covering filter reviews as your traffic changes.
- Quotes follow from the written scope, so ask for the number of sensors, interfaces, filters and test cycles to be listed explicitly.
- Confirm with your own environment and vendor documentation which Security Onion version and sensor design you run before scoping.

