An organization has two VPC firewall rules applied to a Compute Engine virtual machine instance. Rule A has a priority of 100 and is set to DENY ingress traffic on port 22. Rule B has a priority of 1000 and is set to ALLOW ingress traffic on port 22. Which firewall rule takes precedence when SSH traffic targets the instance?
- Rule A takes precedence because in Google Cloud VPC firewall rules, lower priority numbers take higher precedence.Answer
- BRule B takes precedence because higher numerical priority values override lower numerical priority values in Google Cloud.
- CRule B takes precedence because ALLOW rules automatically override DENY rules regardless of priority settings.
- DBoth rules are evaluated simultaneously, and traffic is permitted because primitive network roles favor connectivity.
Answer
Rule A takes precedence because in Google Cloud VPC firewall rules, lower priority numbers take higher precedence.
In Google Cloud VPC firewall rule ordering, priority is an integer from 0 to 65535, where lower numbers specify higher precedence. Rule A has a priority of 100, which is smaller (higher priority) than Rule B's priority of 1000, so Rule A is evaluated first and DENYs the traffic.
Step-by-Step Solution
Key Concept
GCP VPC Firewall Rule Priority Precedence
Estimated Time:45s