01 / 21

IDS vs. IPS
Network Security Defenses

Understand how Intrusion Detection Systems and Intrusion Prevention Systems protect networks, and learn the common detection goals that drive modern cybersecurity.

Cyber Security

What is a Network Intrusion?

A network intrusion is any unauthorized activity on a computer network. This includes attempts to steal data, install malware, exploit vulnerabilities, or disrupt services. Intrusions can come from external attackers or even insider threats.

Intrusion Detection System

IDS ALERT to Admin Inbound Traffic Outbound Traffic Passive: monitors a copy of traffic (network tap)

An IDS monitors network traffic passively. It sits on a network tap or span port, examines copies of packets, and raises alerts when suspicious activity is detected: but it does not block the traffic.

Intrusion Prevention System

IPS ✕ Inbound Traffic Outbound Traffic Inline: all traffic flows through the IPS

An IPS sits directly inline with network traffic. Every packet must pass through it. When the IPS detects a threat, it can drop, block, or reset the malicious connection in real time: no human intervention required.

The Core Principle

IDS: Detect and Alert
Monitors traffic passively. Sends alerts to security teams. Does not stop attacks on its own.
IPS: Detect and Prevent
Sits inline with traffic. Automatically blocks malicious packets. Can stop attacks in real time.

How Do They Detect Threats?

Detection Methods Signature-Based Known attack patterns Anomaly-Based Deviation from baseline Policy-Based Violates defined rules Matches traffic against a database of known attack signatures Learns normal behavior, flags anything that deviates from baseline Checks traffic against admin-defined security policies and rules

Signature vs. Anomaly Detection

Signature-Based
Compares traffic to a known database of attack patterns. Fast and accurate for known threats. Cannot detect zero-day attacks.
Anomaly-Based
Builds a baseline of normal behavior and flags deviations. Can catch novel attacks. Higher rate of false positives.

Key Distinction: IDS vs. IPS

Feature IDS IPS
DeploymentPassive (tap/span)Inline (all traffic)
ResponseAlert onlyBlock, drop, reset
Latency ImpactNoneSlight increase
Risk of Blocking Legitimate TrafficNoneYes (false positives)
Single Point of Failure?NoYes, if not HA
Best ForVisibility and forensicsActive defense

Common Detection Goals

Confidentiality
Detect data exfiltration, unauthorized access to sensitive resources, and eavesdropping.
Integrity
Identify unauthorized modifications: file tampering, man-in-the-middle attacks, injection attempts.
Availability
Spot denial-of-service (DoS/DDoS) floods, resource exhaustion, and service degradation.

Network vs. Host Based

NIDS / NIPS
Monitors network traffic at strategic points (routers, switches). Sees the big picture across all devices on the segment.
HIDS / HIPS
Runs on individual hosts. Monitors system logs, file changes, and processes. Deep visibility into a single machine.

How to Choose: IDS, IPS, or Both?

1
Identify your priority: Do you need visibility (IDS), active defense (IPS), or both?
2
Assess your tolerance for false positives: An IPS that blocks legitimate traffic can hurt business. Start with IDS if unsure.
3
Consider latency: Inline IPS adds processing time. For latency-sensitive networks, weigh the cost.
4
Plan for high availability: An inline IPS is a single point of failure. Deploy in failover pairs.
5
Tune and maintain: Both systems need regular signature updates and rule tuning to stay effective.

Example: Detecting a Port Scan

Attacker Port 22 Port 80 Port 443 Server IDS Alert Port Scan Detected

Example: IPS Blocks SQL Injection

Attacker ' OR 1=1 -- IPS Signature Match ✕ BLOCKED Web Server Protected //

Example: Anomaly Detection in Action

Time Traffic Volume Normal Baseline Anomaly!

False Positives vs. False Negatives

False Positive
Benign traffic flagged as malicious. Causes alert fatigue (IDS) or blocks legitimate users (IPS). Common with anomaly-based detection.
False Negative
Malicious traffic that goes undetected. The attack succeeds with no alert. Common when signatures are outdated or baselines are too loose.

Common Mistakes

✕ Confusing IDS with IPS
An IDS only alerts: it cannot block traffic. An IPS is inline and can actively prevent attacks.
✕ Ignoring False Positives
Untuned systems flood analysts with noise, causing alert fatigue and missed real threats.
✕ Deploy and Forget
Signature databases need regular updates. Without them, new attacks slip through as false negatives.

Summary Comparison

Aspect IDS IPS
ModePassive (copy of traffic)Inline (all traffic)
ActionAlert, logAlert, log, block, drop
LatencyZero addedSlight increase
False Positive RiskAlerts only: low impactBlocks traffic: high impact
Failure ModeLoses visibility onlyCan disrupt network (SPOF)
Detection MethodsSignature, Anomaly, Policy
Deployment TypesNetwork-based (NIDS/NIPS) or Host-based (HIDS/HIPS)

Question 1 of 5

What is the primary difference between an IDS and an IPS?

Question 2 of 5

Which detection method compares traffic against a database of known attack patterns?

Question 3 of 5

A company deploys an IPS, and it starts blocking legitimate customer transactions. What is this called?

Question 4 of 5

What is the main advantage of anomaly-based detection over signature-based detection?

Question 5 of 5

Why is an inline IPS considered a potential single point of failure?