Firewall Rule Builder
Firewall PBQs are where Security+ candidates lose easy marks — not because the ideas are hard, but because one wrong source, one wrong port, or one rule in the wrong order breaks the whole policy. This lab puts you at the firewall: read the scenario, build the ACL rule by rule, watch test packets travel through your rules, and get scored out of 100 against every requirement. The first two scenarios are the actual firewall PBQs from the CertCrack Security+ book; the third is an extension in the same style.
The policy your ACL must implement
Packet flow — see your rules work
Pick a test packet and send it through the ACL you have built below. It stops at the firewall, lights up the first rule it matches, and ends up delivered or dropped.
Your ACL — the firewall starts with only a default deny
How ACLs work — the five ideas every PBQ tests
1. First match wins. The firewall walks the rule list from the top. The first rule whose source, destination and service all match the packet decides whether it passes or drops — and the walk stops there. A perfect rule in the wrong position is a wrong rule.
2. Deny by default. Anything that matches no allow rule is dropped by the implicit deny at the end. You never write a rule for traffic you want blocked unless it needs to beat an allow — you simply leave it out, and the default deny does the work.
3. Least privilege, written narrowly. The book's answer keys are ruthless about scope: the source is the single administrator workstation, not the whole user network; the destination is the backup server itself, not its whole VLAN; the port is TCP 443, not “any”. Every widening is a point lost and a hole opened.
4. Exceptions go above the rule they escape. In the book's second firewall PBQ, the narrow backup allow (LAN → backup server, TCP 10000) must sit above the broad deny (LAN → whole backup VLAN, any port). Swap them and the deny matches first — backups break even though both rules are “correct”.
5. Direction matters. Traffic in a tiered design flows one way: internet → web, web → application, application → database. The web server never talks to the database directly, and a DMZ server never initiates connections into the LAN. Return traffic for an allowed session is stateful and handled by the firewall — it does not need, and must not get, its own inbound allow.
| Rule part | What it pins down | The classic PBQ trap |
|---|---|---|
| Action | Allow or deny when the rule matches | Denying traffic the business needs (breaks the requirement) |
| Source | Who may send — a host, a network, or any | The whole /24 where only one workstation is allowed |
| Destination | The exact host or network being reached | The whole VLAN where only one server is allowed |
| Service / port | Protocol and port, e.g. TCP 443 | “Any” port where the policy names one service |
| Position | Where the rule sits in the first-match order | A broad deny above the narrow allow it swallows |
Firewall ACL FAQ
What does first-match mean in a firewall ACL?
The firewall compares a packet against the rules from the top down. The first rule whose source, destination and port all match the packet decides its fate — allow or deny — and no later rule is consulted. That is why a narrow exception must sit above any broader rule that would match the same traffic first.
Why does every ACL end with a default deny?
A firewall is deny-by-default: anything that does not match an allow rule is dropped. The final deny-any rule (the implicit deny) makes that explicit. You write allow rules only for the exact traffic the business needs, and everything else — scanners, mistakes, new attacks — falls into the default deny.
Why is allowing the whole LAN to use SSH the classic wrong answer?
Because of least privilege. If the rule allows the whole user network, every host in it — including a compromised one — can attempt to manage the server. The policy says only the administrator workstation may manage it, so the rule's source must be that single address, not the /24 network. Security+ PBQs are built to catch exactly this.
If the default deny catches everything, why write explicit deny rules?
An explicit deny documents the policy in the rule set itself, so the next engineer can see the intent instead of guessing. It also protects the traffic if a broader allow rule is ever added above it later — first-match means only a deny that is evaluated before that allow can stop the traffic.
Keep going
This lab mirrors the firewall PBQ practice in the CompTIA Security+ (SY0-701) Complete Study Guide & Practice Questions book on certcrack.com — the same networks, the same rule logic, scored the same way, requirement by requirement. The book's code unlocks all 10 PBQ labs and the full 800-question bank online.