Rule order and default deny
Read the decision procedure
A firewall rule describes traffic conditions and an action. In a first-match policy, evaluate rules in order and use the first matching action. If no rule matches, use the defined default. Not all products use first-match semantics: verify rule processing before reasoning about real policy.
A small ordered policy
Our paper model has two rules: R10 denies guest-to-management traffic; R20 permits guest-to-web TCP destination port 443. The default is deny. Guest-to-web TCP 443 is allowed by R20, while guest-to-web TCP 80 matches neither and is denied. These are invented zone labels, not device commands.
Direction and overlap
Ingress enters the boundary being considered; egress leaves it. State the boundary, protocol, source, destination and direction for each requirement. In a first-match list, an earlier broad deny can make a later intended allow unreachable. Review overlap in both directions rather than assuming a lower rule overrides an earlier one.
Default deny with explicit needs
Start from documented business flows and allow only what is required. Include needed infrastructure traffic and both IPv4 and IPv6 where enabled. Denial may be silent or logged according to policy; a log entry is evidence of a decision at one point, not proof of malicious intent. Avoid blanket allow rules as troubleshooting shortcuts.
Practice: predict the outcome
Apply R10 and R20 to guest-to-management TCP 443 and guest-to-web UDP 443. Both are denied, but for different reasons: R10 versus the default. Record the matched rule or default beside every decision. Next: design network zones.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Rule order and default deny — knowledge check
Reason about fictional firewall policy and verification.
In the paper first-match model, two rules match. Which decides?
No rule matches and default is deny. What happens?
R20 allows guest-to-web TCP 443. What about UDP 443 without another match?
What must ingress and egress be relative to?
A deny log appears. What can be concluded?