Ordering Firewall Rules for SSH Access
An administrator is configuring an ordered firewall to protect a web server at 10.10.10.100. The default policy at the bottom of the rule list is DENY ALL. The goal is to block SSH (TCP port 22) traffic from a known malicious IP (10.50.5.5) while allowing SSH traffic from all other IP addresses.
Approach X places “ALLOW TCP ANY to 10.10.10.100 Port 22” as Rule 1, and “DENY TCP 10.50.5.5 to 10.10.10.100 Port 22” as Rule 2.
Approach Y places “DENY TCP 10.50.5.5 to 10.10.10.100 Port 22” as Rule 1, and “ALLOW TCP ANY to 10.10.10.100 Port 22” as Rule 2.
Which approach correctly achieves the administrator’s goal, and why?
Approach Y, because the specific deny rule must be processed before the general allow rule to prevent the malicious IP from being permitted.
Approach Y, because deny rules are always automatically prioritized over allow rules regardless of their order in the list.
Approach X, because placing the allow rule first reduces the processing load on the firewall for the majority of legitimate traffic.
Approach X, because the firewall must first establish that SSH is generally allowed before it can process exceptions.
Question Leaderboard
Not enough data yet to show leaderboard.
