Policy review

Review a rule set with history

Lesson 19 of 20 · 14 min · Module 6: Put it together

Every production firewall carries a temporary rule that became permanent, a rule nobody can explain, and a deny that never worked.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Apply order, width, leftover and logging checks to one policy
  • Recognise a temporary rule that defeats the whole policy
  • Leave a rule set that does what it claims

The idea

A policy review brings the earlier lessons together: order (is every exception above the rule it limits?), width (does any rule allow more than its purpose?), leftovers (test rules, dead rules), and visibility (are the important decisions logged?).

allow any from any to any      # "temporary, for testing"

01Check the order

For each deny, ask whether an allow above it already takes the same traffic. Here the kiosk deny sits below the office website rule, so the kiosk reaches the website: the deny is shadowed for exactly the traffic it was written for.

02Hunt for leftovers

"allow any from any to any" is a test rule someone forgot. From its position downward, the policy is decoration: every packet that reaches it is allowed. Remove it, and expect something that depended on it by accident to need a proper rule.

03Restore visibility

Administrative access and the cleanup rule should be logged. A review is also the moment to read the hit counters and ask the owners about rules with no hits and no reason.

Your turn

Review this policy and fix four findings. 1. The kiosk must not reach servers, but it does. 2. A test rule allows everything. 3. Administrator SSH is not logged. 4. The cleanup rule is not logged. Staff must keep the website and DNS.

What the checks look for

  • The kiosk is stopped by its deny rule
  • The test rule is gone
  • Administrator SSH is logged
  • A logged cleanup rule is last, and blocked attempts are recorded
  • Staff keep the website and DNS
Try it in the editor →

Take this with you

Review a policy for order, width, leftovers and logging. The goal is a rule set that does exactly what a reader would expect from it.

Go a little further

The kiosk can no longer resolve names, because the DNS server is in servers. Decide whether that is acceptable, and which rule you would add above the deny if it is not.

Learn Firewall Foundations for free

20 short lessons with real code and instant checks.

See the whole course →