Security · 6 min read · 30 November 2026

IDS vs IPS vs Firewall: What Each One Does and Where It Sits

A firewall enforces access rules, an IDS detects attacks and alerts, an IPS blocks them inline. How each works, where to place them, and how they fit together.

A firewall decides which connections are allowed, an intrusion detection system (IDS) watches traffic and raises alerts when it sees an attack, and an intrusion prevention system (IPS) sits in the traffic path and blocks attacks as they happen. They solve different problems and are often combined in one next-generation firewall.

Firewall: access control

A firewall enforces rules based on source, destination, port, protocol and, in next-generation firewalls, the application and user. It answers "should this connection be allowed?" It does not, by itself, look for an attack hidden inside traffic it has allowed, such as an exploit sent to an open web port. See what a firewall is.

IDS: detect and alert

  • Receives a copy of the traffic from a SPAN port or network tap, so it is out of the traffic path.
  • Compares traffic against signatures of known attacks and looks for unusual behaviour.
  • Raises alerts for the security team or a SIEM; it does not stop the traffic.
  • Cannot break the network if it fails or is misconfigured, which makes it easy to introduce.

IPS: detect and block

  • Sits inline, so every packet passes through it.
  • Drops malicious traffic or resets the connection in real time.
  • Must be sized for the full traffic volume and tuned carefully: a false positive blocks legitimate traffic.
  • Usually starts in detection-only mode, then blocking is enabled for well-tested rule sets.

Side by side

FirewallIDSIPS
Main jobAllow or deny connectionsDetect attacks, alertDetect and block attacks
PositionInlineOut of band (copy of traffic)Inline
Looks atAddresses, ports, applicationsPacket contents and behaviourPacket contents and behaviour
Risk if wrongBlocks or exposes servicesMissed or noisy alertsBlocks legitimate traffic

How they fit together

  • Small and medium sites usually run IPS as a feature of the internet gateway or next-generation firewall, at the internet edge.
  • Larger networks add IDS sensors inside, between zones such as servers, users and OT networks, to see lateral movement.
  • Encrypted traffic limits what IDS and IPS can see; endpoint protection and logs fill that gap.
  • An open-source IDS such as Suricata is a good way to start: see Suricata IDS setup.

Navijin offers dedicated intrusion prevention appliances and secure internet gateways for the network edge.

FAQ

Frequently asked questions

What is the difference between IDS and IPS?

An IDS monitors a copy of the traffic and raises alerts. An IPS sits inline in the traffic path and can block malicious traffic in real time.

Do I need an IPS if I have a firewall?

A firewall controls which connections are allowed but does not inspect allowed traffic for attacks. An IPS adds that inspection; many next-generation firewalls include it as a feature.

Where should an IDS be placed?

Where it can see the traffic that matters: behind the internet firewall and between internal zones, fed from a SPAN port or network tap.

Can an IPS slow down the network?

Yes, if it is undersized, because every packet passes through it. Choose a model rated for your traffic with IPS enabled, and tune rules to avoid false positives.

Need help designing your network?

Navijin engineers provide free design consultations, bills of materials and quotations for business projects.