A security operations team is reviewing firewall rules configured for a custom-mode Virtual Private Cloud (VPC) network. Two ingress firewall rules target Compute Engine instances carrying the tag `analytics-worker`:
- Rule 1: Action: DENY | Priority: 900 | Source CIDR: `10.10.0.0/16` | Protocol/Port: `tcp:80`
- Rule 2: Action: ALLOW | Priority: 1100 | Source CIDR: `10.10.1.0/24` | Protocol/Port: `tcp:80`
An internal client with IP address `10.10.1.50` sends an HTTP request on port 80 to a VM tagged `analytics-worker`. Which behavior will Google Cloud exhibit for this network request?
- The request is denied because Rule 1 has a lower priority number (900), giving it higher precedence over Rule 2.Answer
- BThe request is allowed because Rule 2 specifies a higher priority number (1100), which overrides rules with lower numerical values.
- CThe request is allowed because Rule 2 specifies a more specific CIDR subnet mask (/24), which automatically takes precedence over broader network ranges.
- DThe request is denied because DENY actions always take precedence over ALLOW actions regardless of the priority assigned to the firewall rules.
Answer
The request is denied because Rule 1 has a lower priority number (900), giving it higher precedence over Rule 2 (1100).
In Google Cloud VPC networking, firewall rules are evaluated strictly by their priority integer (ranging from 0 to 65535). Lower numerical values signify higher precedence. Because Rule 1 is assigned priority 900 and Rule 2 is assigned priority 1100, Rule 1 is evaluated first and denies the incoming HTTP request.
Step-by-Step Solution
Key Concept
GCP Firewall Priority Order Evaluation
Estimated Time:1m 30s