Course contentsShow
← Security
Lesson 433 of 3,05210. Network Security - Firewalls and SegmentationFree lesson

Common Rule Antipatterns

Identify dangerous patterns like any-any rules, overly broad source ranges, and shadowed rules.

Common Rule Antipatterns

You'll learn: How to spot dangerous firewall rule patterns that create gaping security holes in your network defenses.

What Are Antipatterns?

Just as you've learned best practices for firewall rules (default deny, explicit allow, least privilege), there are antipatterns—common mistakes that security professionals make repeatedly. These dangerous patterns might seem convenient in the moment but undermine your entire security posture.

The Most Dangerous Antipatterns

Any-Any Rules

The worst offender: a rule that allows any source to reach any destination on any port. This is essentially turning off your firewall entirely. Example: "Allow all traffic from 0.0.0.0/0 to 0.0.0.0/0 on any protocol."

Why it's dangerous: Remember the default deny principle? An any-any rule defeats it completely, letting attackers move freely once they breach your perimeter.

Overly Broad Source Ranges

Rules like "Allow 10.0.0.0/8 to access database server" when only a handful of specific servers actually need access. You're granting thousands of potential IP addresses permission when only five should have it.

Why it's dangerous: Violates least privilege—if an attacker compromises any machine in that huge range, they inherit database access.

Shadowed Rules

When Rule #15 blocks SSH from external networks, but Rule #5 already allowed all TCP traffic from everywhere. Rule #15 never executes because Rule #5 caught the traffic first. Remember: rule ordering matters!

Why it's dangerous: You think you're protected, but the blocking rule is invisible—shadowed by an earlier, broader rule.

Prevention

Always review rules from top to bottom, question broad permissions, and document why each rule exists (remember rule comments from your last lesson).

Key Takeaway: The three firewall antipatterns to avoid are any-any rules (allowing everything), overly broad source ranges (violating least privilege), and shadowed rules (invisible due to poor ordering).