Skip to content
Pro lab

Firewall Rule Lab

Firewalls rarely fail on syntax. They fail on an any/any someone added “temporarily”, a vendor rule that expired two years ago, a deny that sits under a broader allow, and a segment boundary nobody wrote down. Here you own the firewalls at Brackenridge Outfitters and inherit five years of quick fixes.

Over 5 rounds you clean up the ruleset, build least-privilege rules for a new app, segment the PCI and OT networks, review the week's change requests and contain a compromised PC. After every change, labelled traffic replays through your rules: block the attacks, break no business flow, and finish with a ruleset and change log you can take to a review.

What is a firewall?

A firewall is a device or program that controls the flow of network traffic between networks or hosts that employ differing security postures (NIST SP 800-41 Rev. 1). It compares each connection with an ordered ruleset and allows or blocks it, so only the traffic your organisation has approved crosses the boundary.

  • Packet filtering is the most basic feature. Rules cover addresses, ports and protocols, and a stateless filter does not track the state of each flow.
  • Stateful inspection adds a state table of connections (typically source and destination address, ports and connection state) and blocks packets that deviate from the expected state.
  • Other types that NIST covers include application firewalls, application-proxy gateways, web application firewalls and host-based or personal firewalls.

A firewall is one layer, not a guarantee. CISA says firewalls primarily help protect against malicious traffic, not malicious programs, and NIST notes a firewall cannot read traffic it cannot inspect, such as encrypted application data. Network address translation is a routing technology that is often mistaken for a firewall. This lab teaches the part you control: ordered, first-match rules with an implicit default deny. See where firewalls sit in the network with the OSI Model Attack Map, and what an outsider sees with the Nmap Command Builder.

Sources, accessed 3 November 2026: NIST, SP 800-41 Rev. 1, Guidelines on Firewalls and Firewall Policy (September 2009), sections 2.1 to 2.3 and glossary; CISA, Understanding Firewalls for Home and Small Office Use (23 February 2023); NIST glossary, firewall.

0s
Seed …

This is the guided version: a yellow flash shows where to click and a bar says what to do. Switch to Free play any time.

GuidedRead the brief, then press Start round 1.

Network security brief

You own the firewalls at Brackenridge Outfitters

Priya Nair · Network security lead

Welcome to Brackenridge Outfitters. You own the firewalls now: the perimeter and the internal segmentation between the user LAN, servers, the PCI segment, the OT network at the distribution centre, management and the peered cloud VPCs. The ruleset you inherit is five years of quick fixes. Rules are matched top-down, first match wins, and anything nothing matches hits the default deny.

Marcus Bell · IT operations manager

I run operations. After every change we replay labelled traffic: business flows and health checks that must pass, attacks that must be blocked. Block the attackers, by all means. But I count every business flow you break, and the web shop and the tills are the two I will call you about first.

Zones · brackenridge.example

  • InternetexternalEverything outside. Customers, suppliers, attackers.
  • DMZ10.10.0.0/24Public web shop, mail relay, remote-access gateway.
  • User LAN10.20.0.0/16Head office and store back-office PCs. 900 seats.
  • Server VLAN10.30.0.0/24Order API, databases, DNS, file shares, reporting.
  • PCI segment10.40.0.0/24Cardholder data: POS gateway, tokenizer, card vault.
  • OT network10.50.0.0/24Distribution centre: conveyor PLCs, HMI, historian.
  • Management10.60.0.0/24Jump host, monitoring, EDR collector, backup.
  • Cloud VPC (peered)172.16.0.0/16Peered cloud VPCs: batch jobs, message queue, DR site.

The ruleset you inherit (Pro: 17 rules)

  1. 1allowShop inbound1.2M hitszone:internet → web-01 · https
  2. 2allowWeb in (2022)0 hitszone:internet → WEB01_OLD · TCP_443Same address as rule 1, through a duplicate object.
  3. 3allowStaff web8.8M hitszone:users → zone:internet · web (80,443)
  4. 4allowStaff DNS3.1M hitszone:users → dns-int · dns
  5. 5allowDNS forwarders2.0M hitsdns-int → upstream-dns · dns
  6. 6allowTEMP Lumenwick support3 hitslumenwick-support → zone:servers · anyExpired 2024-10-31. Still has hits.
  7. 7allowShop to order API641k hitsweb-01 → app-01 · app-8443
  8. 8allowJump host SSH4.3k hitsjump-01 → zone:servers · ssh
  9. 9allowUsers file shares1.9M hitszone:users → file-01 · smb
  10. 10allowDR replication0 hitsdb-01 → dr-site · mssqlZero hits. Ask the DBA before you touch it.
  11. 11allowBackups27k hitszone:servers → backup-01 · backup-agent
  12. 12allowMonitoring512k hitsnms-01 → GRP_IT_ZONES · monitoring (icmp, snmp)
  13. 13allowOld FTP0 hitszone:internet → ftp-old · ftpZero hits, no owner.
  14. 14allowCloud peering97k hitszone:cloud → zone:servers · any
  15. 15allowany any temp41k hitsany → any · anyThe any/any. 41,377 hits.
  16. 16denyBlock telnet0 hitsany → any · telnetSits under the any/any.
  17. 17allowStaff DNS (dup)0 hitszone:users → DNS_SERVER · dns

Five rounds, escalating · 58 labelled flows at this level

  1. 1Clean up the inherited ruleset · Shadowed rules, an any/any, duplicate objects, dead rules and a vendor rule that expired in 2024.+19
  2. 2Least privilege for a new app · Write the rules for the loyalty app from its flow description, and nothing more.+9
  3. 3Segment PCI and OT with documented conduits · Close the PCI segment and the OT network to everything except named, documented conduits.+11
  4. 4Change request review · Approve, reject or modify the week's change requests. Each decision lands in the ruleset.+11
  5. 5Incident: contain a compromised host · Emergency rules to isolate an infected PC and cut its C2, without breaking production.+8
45%
Threats
blocked, and logged
35%
Business
flows and health checks kept
20%
Hygiene
clean rules and checks

Classic mistakes cost extra

  • An any/any allow in the ruleset−10
  • Broke the web shop or card payments−10
  • An expired rule still enforcing−6
  • PCI or OT segmentation breached−8
  • An emergency rule with no expiry−5

Each round you make the round's decision, then edit the ruleset and replay the flows as often as you like. Shipping scores the round on every flow so far, so a change that breaks round 1 still costs you in round 5. A blocked attack with no log line counts for less than one you can prove you stopped. Your final grade is 80% the average round score and 20% your decisions; 75% clears it. Pro: notes after your first replay, fixes after the second.

SeedSame seed and level = same flows, change requests, decisions and incident.

Loading…

Sample report · illustrative data

Sample result: firewall rule lab scorecard

After editing the inherited ruleset of an invented company, the lab replayed labelled attack and business flows against the final rules and scored the outcome.

Scorecard

Total
75% (pass mark 75%)
Weighting
Threat handling 45%, business flows 35%, ruleset hygiene 20%, less a penalty per mistake
Attack flows blocked
10 of 12 (8 of them logged)
Business flows kept
9 of 10
Hygiene checks passed
5 of 8

Example mistakes called out

  • A rule with an expiry date in the past was left in the ruleset.
  • A flow from the internet into the cardholder segment was still permitted.
  • A temporary rule with no expiry was added during the change round.

The lab data is fully synthetic: invented company, RFC 1918 internal addresses and documentation-range external addresses.

Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.

TL;DR

What this lab is

5 points
  • A firewall rule lab in 5 rounds: you own the perimeter and internal segmentation firewalls at Brackenridge Outfitters, a fictional retailer with 8 zones (internet, DMZ, user LAN, server VLAN, PCI segment, OT network, management and peered cloud VPCs).
  • You clean up a 19-rule inherited ruleset (an any/any, shadowed rules, duplicate objects, zero-hit rules, a vendor rule that expired two years ago), write least-privilege rules for a new app from its flow description, segment PCI and OT with documented conduits, review up to 6 change requests, and contain a compromised host with emergency rules.
  • Rules use address and service objects (hosts, subnets, zones, groups) and carry an action, logging, an owner, an expiry date and a comment. Evaluation is ordered and first-match-wins, with an implicit default deny that does not log unless you switch it on.
  • After every change you replay up to 67 labelled flows: business flows and health checks that must pass, attacks and policy violations that must be blocked. Each flow shows the rule that decided it, and every rule shows its 90-day and replay hit counts.
  • You are scored on threats blocked (and logged) against business flows broken, plus rule hygiene and quality checks, minus five classic mistakes. Two teammates comment on every decision, and the debrief exports the final ruleset and change log as Markdown. Runs are seeded, so a ?seed= link replays the same network.

Frequently asked questions

What is a firewall?

NIST SP 800-41 Rev. 1 defines a firewall as a device or program that controls the flow of network traffic between networks or hosts that employ differing security postures. It decides, by a ruleset, which traffic is allowed through and which is blocked. Types include packet filters, stateful inspection firewalls, application firewalls and proxies, web application firewalls and host-based firewalls. A firewall does not stop malware by itself: CISA says firewalls primarily help protect against malicious traffic, not against malicious programs.

What is the Firewall Rule Lab?

A browser-based training lab where you run the firewalls for a fictional company. Over 5 rounds (ruleset cleanup, least privilege for a new app, PCI and OT segmentation, a change advisory board, and an incident) you make a decision, edit an ordered ruleset and replay labelled traffic through it. Flows from earlier rounds stay in the replay, so a change that breaks round 1 still shows up in round 5.

How does first-match-wins evaluation work?

The firewall checks rules from the top. The first rule whose source, destination and service all match the packet decides it, and nothing below is consulted. If no rule matches, an implicit default deny drops the packet. That is why order matters: a broad allow placed above a specific deny makes the deny useless.

What are shadowed and redundant rules?

A rule is shadowed when an earlier rule matches every packet it would match, with the opposite action, so it can never take effect (a deny under a broader allow, for example). It is redundant when the earlier rule has the same action: it never fires and is just dead config. The lab finds both by comparing address and service objects, including duplicate objects that point at the same address under a different name.

Why is an any/any rule so dangerous?

An any → any allow permits everything that reaches it, so every specific rule below it stops mattering and every attack that nothing above denies gets through. They are usually added "temporarily" while troubleshooting. Remove one by reading its hit log, writing specific allows above it for the legitimate flows it carries, then deleting it in a change window.

Should I delete every rule with zero hits?

Not blindly. Zero hits in 90 days makes a rule a candidate for removal, but periodic jobs such as quarterly DR tests, year-end processing or annual audits look dead in a 90-day counter. Ask the owner, then either remove the rule or keep it with a reason and a review date. The lab includes one of each.

What is least privilege on a firewall?

Each rule allows only the source hosts, destination hosts and service a documented flow needs. "DMZ to server VLAN on any port" is the opposite: if the web tier is compromised, the attacker gets the whole server zone. Write rules from the application's flow description, host to host on named services, and restrict server egress to the destinations they actually call.

What is a documented conduit for PCI or OT segmentation?

A conduit is a defined, controlled path between security zones (the term comes from the IEC 62443 standard for industrial systems). On the firewall it is a narrow rule with an owner, a reason, a review date and logging, for example "OT historian pushes to its IT mirror on 443". Segmentation then means only the conduits pass, with an explicit logged deny at each boundary. For PCI DSS, keeping connections to the cardholder data environment this narrow is what keeps other systems out of scope.

Why log deny rules?

A deny without logging blocks the traffic and leaves no evidence. You cannot show an auditor what segmentation stopped, and the SOC cannot see a scan or a beacon being blocked. The lab gives a blocked attack less credit when no log line was written, and the default deny on this firewall stays silent until you switch its logging on.

How should I review a firewall change request?

Check that the business justification matches what is asked, then approve, modify or reject. Most risky requests can be modified into something safe: pin the source to the partner's address, the destination to one host, the service to what is used, and add an expiry tied to the business reason. Reject what would expand regulated scope or open OT to the internet, and approve narrow, read-only, logged requests quickly.

How do you contain a compromised host with firewall rules?

Put emergency rules at the top so nothing above can let the traffic through: allow the EDR or forensic collector to reach the host, then deny the host to anything and anything to the host, and deny the command-and-control address for every other host too. Scope them to the smallest object that contains the threat (a /32, never the whole /24 if a business service shares it), log them, assign them to the incident team and give them a short expiry.

How do difficulty, seeds and scoring work?

Rookie inherits fewer rules and flows and shows teammate notes and fixes from the start. Pro adds more inherited mess, more flows and a fourth change request, with notes after your first replay. Elite adds the hardest rules, flows and every change request, with only structural flags (shadowed, any/any, expired) until you ship. Each round scores 45% threats blocked, 35% business flows and health checks kept and 20% hygiene and checks, minus mistake penalties; the final grade is 80% rounds and 20% your decisions. The ?seed= value fixes the flows, change requests, design calls and incident addresses, so a colleague can replay your exact network.

Is this a real firewall, and is any of the data real?

No. It is a vendor-neutral teaching model of ordered, first-match-wins packet filtering with an implicit default deny. It leaves out stateful tracking, NAT and application inspection so the lessons on ordering, specificity, hygiene and change control stay clear. Brackenridge Outfitters and brackenridge.example are invented, internal addresses are RFC 1918 and external ones come from the RFC 5737 documentation ranges.

The tools people use most on PlayCISO.

All tools