---
title: "Network Security: Firewalls and Segmentation"
domain: cybersecurity
level: intermediate
duration: "2h 30min total"
---

# Network Security: Firewalls and Segmentation

A flat network lets one compromised laptop reach every server. Firewalls and segmentation limit how far an attacker can move, and a default-deny policy turns "everything is open unless we remembered to close it" into "only what we allowed is open". This module explains the kinds of firewalls, how to split a network into zones, what intrusion detection adds, and how zero trust changes the picture, and lets you build and test a segmented network yourself.

## Learning objectives
By the end of this module you will be able to:
1. Compare stateless packet filters, stateful firewalls, next-generation firewalls and web application firewalls (WAF).
2. Design network zones with a demilitarized zone (DMZ) and write a default-deny rule set that allows only the required flows.
3. Explain what intrusion detection and prevention systems (IDS/IPS) do and how they complement firewalls.
4. Explain the principles of zero trust architecture and how they differ from perimeter-based security.
5. Verify a firewall policy by testing allowed and blocked flows and reading the firewall's logs.

## Prerequisites
- [Networking 08 — Transport Layer: TCP, UDP and Ports](../../networking/08-tcp-udp/README.md) and [Networking 10 — Routing Fundamentals](../../networking/10-routing-fundamentals/README.md).
- [04 — Security Fundamentals](../04-security-fundamentals/README.md).
- For the lab: a Linux machine with Podman 4 or later. Cost: free.

## Contents
| Type | Duration |
|---|---|
| [Theory](lesson.md) | 55 min |
| [Hands-on lab: segmenting a network with a default-deny firewall](lab.md) | 75 min |
| [Assessment (10 questions)](quiz.md) | 15 min |

## Further reading
- [NIST SP 800-41 Rev. 1](https://csrc.nist.gov/pubs/sp/800/41/r1/final) — Guidelines on Firewalls and Firewall Policy
- [NIST SP 800-207](https://csrc.nist.gov/pubs/sp/800/207/final) — Zero Trust Architecture
- [NIST SP 800-94](https://csrc.nist.gov/pubs/sp/800/94/final) — Guide to Intrusion Detection and Prevention Systems (IDPS)
- [nftables wiki](https://wiki.nftables.org/) — the Linux packet filter used in the lab
