Lion Cipher Lab
Build a three-zone network in namespaces and prove the firewall policy with tests
- Cyber / Security Engineer
- Intermediate
- ~75 min
- Free · no account required
Why it matters
Most breaches spread because one machine could talk to another it had no reason to reach. Network zones are the standard answer: public-facing servers sit in a DMZ, internal machines sit behind the firewall, and each zone is only allowed to start the connections it needs. The firewall rules are short. The hard part is knowing they do what you meant, and keeping them that way when somebody adds a quick fix in a hurry. Writing the policy as tests first, and running them every time the rules change, is how you turn a firewall from something you hope works into something you have shown works.
What you'll learn
- describing inside, DMZ and outside zones and the direction each is allowed to start connections in
- building a routed firewall with nftables: a forward chain with default drop and established-traffic rules
- writing the intended policy as a table of expected allow and deny results before writing any rule
- running the table as a test, watching it fail on an open network and pass on the firewall
- catching a bad quick fix by re-running the tests, and reading rule counters to see what was dropped
Steps in this lab
- Zones, and who may start a connection
- Build the three zones around a firewall namespace
- Start a listener in every zone
- Write the policy as a test table first
- Run the tests with no firewall: they should fail
- Write the ruleset: forward chain, default drop
- Run the tests again: green
- Break it on purpose: a bad quick fix
- What a professional does differently
- Clean up
Open the full interactive lab →