An organization operates a custom-mode Virtual Private Cloud (VPC) named `production-vpc`. To adhere to security compliance, an ingress firewall rule named `deny-ssh-global` was created with a priority of `1000` to deny TCP port 22 traffic from source `0.0.0.0/0` across all instances in the VPC. The operations team now requires temporary SSH access to a specific subset of Compute Engine instances tagged with `ops-troubleshoot` from an internal management IP range of `10.50.0.0/20`. How should you configure the new firewall rule to allow this access while leaving the global restriction intact for all other instances?
- Create an ingress firewall rule allowing TCP port 22 from source IP range 10.50.0.0/20 with target tag ops-troubleshoot and assign a priority of 500.Answer
- BCreate an ingress firewall rule allowing TCP port 22 from source IP range 10.50.0.0/20 with target tag ops-troubleshoot and assign a priority of 2000.
- CApply a Deny IAM policy at the folder level to block project-level network permissions for unauthorized users.
- DGrant the primitive Editor role to the service account assigned to the ops-troubleshoot instances.
Answer
Create an ingress firewall rule allowing TCP port 22 from source IP range 10.50.0.0/20 with target tag ops-troubleshoot and assign a priority of 500.
In Google Cloud VPC networks, firewall rules are processed according to numerical priority order, where lower integer values denote higher evaluation precedence (priority 0 is evaluated first). Creating an ingress ALLOW rule with a priority of 500 ensures that incoming packets matching the target tag ops-troubleshoot and source range 10.50.0.0/20 are evaluated and permitted before reaching the broad DENY rule configured at priority 1000.
Step-by-Step Solution
Key Concept
GCP VPC Firewall Rule Priority Precedence