An infrastructure team is configuring ingress firewall rules in a custom-mode Virtual Private Cloud (VPC) network. The web application frontend Compute Engine instances carry the network tag `web-frontend`. The team needs to allow public inbound HTTPS (TCP port 443) traffic to these instances from any IPv4 source (`0.0.0.0/0`), but must strictly block all inbound HTTPS traffic coming from a known malicious subnet (`198.51.100.0/24`), even if those requests target the `web-frontend` instances. Which firewall rule configuration correctly achieves this requirement while adhering to Google Cloud VPC rule evaluation precedence?
- Create an ingress DENY rule for TCP port 443 from source CIDR 198.51.100.0/24 with priority 500 targeting web-frontend, and an ingress ALLOW rule for TCP port 443 from source CIDR 0.0.0.0/0 with priority 1000 targeting web-frontend.Cevap
- BCreate an ingress DENY rule for TCP port 443 from source CIDR 198.51.100.0/24 with priority 1500 targeting web-frontend, and an ingress ALLOW rule for TCP port 443 from source CIDR 0.0.0.0/0 with priority 1000 targeting web-frontend.
- CCreate an ingress ALLOW rule with priority 1000 targeting web-frontend, and grant the Compute Security Admin role directly on the individual Compute Engine instances to override VPC network rule evaluation for untrusted IPs.
- DGrant the Owner primitive role to the service account assigned to the web-frontend instances to automatically enable advanced packet filtering against blocked CIDR blocks.
Cevap
Create an ingress DENY rule for TCP port 443 from source CIDR 198.51.100.0/24 with priority 500 targeting web-frontend, and an ingress ALLOW rule for TCP port 443 from source CIDR 0.0.0.0/0 with priority 1000 targeting web-frontend.
In Google Cloud Virtual Private Cloud (VPC) firewall rule architecture, rules are processed in order of priority from 0 to 65535, where a lower numerical value indicates higher precedence. When network traffic matches a rule, rule processing terminates. Assigning priority 500 to the DENY rule for source CIDR 198.51.100.0/24 ensures that requests from this restricted block are evaluated and denied before reaching the priority 1000 ALLOW rule for 0.0.0.0/0.
Adım Adım Çözüm
Anahtar Kavram
VPC Firewall Rule Priority Precedence
Tahmini Süre:2m 0s