How is an IPS different from an IDS?

The short answer

An IPS (intrusion prevention system) sits in the traffic's path and drops a matching packet. An IDS (intrusion detection system) only reads a copy and writes an alert after the packet has passed.

Animated diagram: How is an IPS different from an IDS?

IDS vs IPS

An intrusion detection system, or IDS, is a watcher. It never handles the real traffic. A mirror port on a switch, or a network tap, hands it a copy of what crosses the network, and the IDS reads that copy. When something looks like an attack, it writes an alert, and a person decides what happens next.

An intrusion prevention system, or IPS, runs the same kind of checks from a different spot. It’s placed inline, in the doorway: packets enter on one side and leave on the other. That position is the whole point. A copy can only be reported on, but a packet that still has to pass through the IPS can be stopped.

What an IDS and an IPS actually look for

Neither tool judges loose packets. They reassemble the traffic first. Suricata and Snort, for example, rebuild TCP (Transmission Control Protocol) streams. Then they compare what they see with rules. Most of those rules are signatures, written descriptions of attacks that are already known. NIST (National Institute of Standards and Technology) SP 800-94 also describes anomaly-based detection and stateful protocol analysis, so signatures are the main method, not the only one.

Every rule ends in an action. Suricata’s documentation lists three: alert generates an alert, drop drops the packet and generates an alert, and reject sends an RST (reset) or ICMP (Internet Control Message Protocol) unreachable error back to the sender. In the eve.json log, an alert usually carries the action allowed. It only reads blocked when a drop fires in IPS mode or a reject fires.

How an IPS stops a packet

  1. It carries the real traffic. Each packet travels through the IPS on its way, either in one network interface and out another, or through NFQUEUE on Linux.
  2. It checks before forwarding. The reassembled traffic is compared with the rules while the packet is still waiting to move on.
  3. It discards a match. A drop rule removes the packet before it reaches the target and records it as blocked.
  4. It depends on staying up. Suricata’s IPS guide warns that when Suricata is stopped, traffic won’t come through. Its bypass option keeps traffic moving, but blocking is then switched off.

So the trade is clear. An IDS only reports, so by the time anyone reads the alert, the packet has already arrived. An IPS can stop the attack in time, but a crash can halt traffic, and a false positive, which NIST describes as benign content wrongly classified as malicious, blocks traffic that was fine.

An IPS is not an all-seeing eye

It’s easy to assume an IPS sees everything that passes through it. It doesn’t. Neither tool can inspect content it can’t decrypt. Without decryption, it still sees addresses, ports and other metadata, but not what’s inside. Devices that do TLS (Transport Layer Security) inspection need the right key or certificate. Equifax shows what happens when that breaks. In 2017, attackers entered through an unpatched Apache Struts 2 flaw. The certificate on the inspection device had expired about ten months before the breach, so their encrypted traffic went through unchecked. When it was replaced on July 29, 2017, the suspicious activity was spotted immediately.

What to do

  • Look in your router’s security settings for an IPS switch and turn it on today. On ASUS routers it sits under AiProtection > Network Protection as Two-Way IPS, though not every model has it.
  • If the option is missing, update the router’s firmware first, as ASUS advises when Two-Way IPS doesn’t appear.
  • Remember that traffic inside a VPN (virtual private network) can’t be checked this way, because ASUS says AiProtection can’t decrypt it.
  • Patch exposed web software and keep certificates on inspection devices from expiring, since both gaps mattered at Equifax.

#IDSvsIPS#IntrusionDetection#IntrusionPrevention#IDS#IPS#Suricata#NetworkSecurity#HomeNetwork#Cybersecurity#InfoSec

Watch it in 60 seconds