IDS and IPS in practice: Snort and Suricata rules, placement, false positives and tuning
In short: An IDS watches a copy of traffic and alerts on suspicious patterns; an IPS sits inline and can block them. Both mainly use signatures, rules describing known attacks, such as those written for Snort and Suricata. Out of the box they produce many false positives, so deploy in detect mode, review alerts, tune noisy rules with thresholds or suppression, then enable blocking for reliable ones.
Detect or prevent
- IDS (intrusion detection): receives a copy of traffic from a SPAN port or network tap and raises alerts. It cannot stop traffic, but it also cannot break anything.
- IPS (intrusion prevention): sits inline, so traffic passes through it, and can drop malicious packets or reset connections. A mistake or false positive can block legitimate traffic.
Most next-generation firewalls include an IPS engine (often called threat prevention), and open-source tools like Suricata and Snort run as standalone sensors or inside platforms such as Security Onion and pfSense.
How detection works
- Signatures: rules that match known attack patterns, such as an exploit for a specific vulnerability or a malware command-and-control request.
- Protocol anomaly detection: traffic that breaks protocol rules.
- Behavioural or anomaly detection: unusual volumes or patterns compared with a baseline (more common in NDR tools).
Reading a rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"Possible malware beacon User-Agent";
flow:established,to_server; http.user_agent; content:"BadBot/1.0"; nocase;
classtype:trojan-activity; sid:1000001; rev:1;)
Action (alert), protocol, source and destination with ports and direction, then options in brackets: a message, the flow direction, which part of the traffic to look at, the content to match, a class and a unique signature ID. Rule sets from Cisco Talos (Snort) and Proofpoint Emerging Threats (Suricata) contain tens of thousands of these, updated daily.
Where to place sensors
- Behind the internet firewall, to see what got through.
- In front of important server segments and the data centre.
- Between internal zones, to catch lateral movement.
Encrypted traffic limits what signatures can see, so combine with TLS inspection, DNS logs and endpoint tools.
Tuning false positives
A newly deployed IDS can produce thousands of alerts a day, most of them harmless. If analysts drown in noise, real attacks are missed.
- Disable rules for software and systems you do not have (for example old Windows exploits when you have no such servers).
- Set variables such as HOME_NET and server groups accurately so rules apply where they make sense.
- Thresholds: alert only after a number of events in a time window.
- Suppression: silence a specific rule for a specific known source, such as your vulnerability scanner.
- Document every change and why, and review suppressions regularly.
Moving to prevention
Run in detect-only mode for a few weeks. Enable blocking first for high-confidence rule categories (known malware, exploit kits) and critical vulnerabilities, then expand. Keep a quick way to disable a rule that blocks something important.
Real-world example: the scanner that hid an attack
A company's IDS produced 20,000 alerts a day, 95 percent from its own weekly vulnerability scanner. Analysts had started ignoring the console. Suppressing scanner alerts by source and disabling irrelevant rule categories cut daily alerts to about 300. Within a week, analysts spotted a real alert for a remote access trojan beaconing from a finance laptop, which had been buried in the noise for days.
Practice
What is the main operational difference between an IDS and an IPS?
What is suppression in IDS tuning?
Why deploy an IPS in detect-only mode first?
Key takeaways
- IDS alerts on copied traffic; IPS sits inline and can block.
- Signatures from Snort and Suricata rule sets detect known attacks.
- Tune with accurate variables, disabled rules, thresholds and suppression.
- Start in detect mode, then block high-confidence rules first.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.