Security Controls & Protection

Firewalls, IDS, IPS and Segmentation

the traffic cops of a network, and how to place them

2 min readupdated by Syed Khaleel Ahmed

Network security tools decide which traffic is allowed and notice when something looks wrong. They work best as part of a design, so we cover the pieces and how they fit.

Firewalls

A firewall allows or blocks traffic according to rules.[1] Main kinds:

  • Packet filter (stateless): checks each packet's addresses, ports and protocol alone.
  • Stateful firewall: remembers connections, so it allows replies to requests you started and blocks unsolicited inbound traffic.
  • Next-generation firewall (NGFW): adds application awareness, user identity, and often intrusion prevention and web filtering.
  • Web application firewall (WAF): understands web (HTTP) traffic and blocks attacks such as SQL injection and XSS. It complements secure code and does not replace it.

Good firewall practice starts with default deny: block everything and allow only what is needed. Rules need owners and regular review, because old rules pile up and create gaps.

IDS and IPS

  • An intrusion detection system (IDS) watches traffic or hosts and alerts on suspicious activity.
  • An intrusion prevention system (IPS) sits in the traffic path and can also block it.[2]

They detect by signatures (known bad patterns), anomalies (deviation from normal) or both. Tuning matters: too sensitive and analysts drown in false positives, too loose and real attacks slip by. Encrypted traffic limits what they can inspect unless it is decrypted at a controlled point.

Segmentation

Dividing a network into zones, with firewalls controlling traffic between them, limits how far an attacker can spread:

  • A DMZ holds public-facing servers, separated from the internal network.
  • Separate zones for users, servers, guests, payment systems and, importantly, industrial or medical equipment.
  • Microsegmentation applies the idea at the level of individual workloads.

Flat networks, where everything can reach everything, are a gift to attackers and a classic ransomware amplifier.

Placement tips

Put controls where they see meaningful traffic: at the internet edge, between internal zones, in front of web applications, and on endpoints. Send their logs to a central system so alerts can be correlated.

Sources

  1. NIST SP 800-41 Rev. 1: Guidelines on Firewalls and Firewall Policy
  2. NIST SP 800-94: Guide to Intrusion Detection and Prevention Systems

Test yourself

My notes

Private — saved only on this device, never sent anywhere.