Lion Cipher Lab

Find unused firewall rules from hit counters and retire them safely

Why it matters

Firewall rule bases collect rules nobody remembers adding. A project ends but its access rule stays. A temporary rule for a migration becomes permanent. A partner relationship ends and their network is still allowed in. Each rule that is no longer needed is attack surface: a path an attacker can use that nobody is watching. NIST's firewall guidance (SP 800-41) treats reviewing and cleaning up rulesets as part of firewall management. The hard question is which rules are safe to remove. The usual evidence is hit counters. iptables counts packets and bytes for every rule, and iptables-save -c…

What you'll learn

Steps in this lab

  1. Counters, and why one snapshot is not enough
  2. The two snapshots
  3. Write the usage analyzer
  4. Run it, and compare with a single snapshot
  5. Test the reset guard
  6. Retire rules safely: ask, disable, watch, delete

Open the full interactive lab →