A cloud engineer is operating a VPC network named `prod-vpc` where a high-priority ingress firewall rule named `block-external-ingress` with priority `1000` denies all incoming traffic from external networks. The engineer needs to configure firewall access to allow Google Cloud load balancer health check probes (`35.191.0.0/16` and `130.211.0.0/22`) to reach backend instances tagged as `web-backend` over TCP port 80. Which `gcloud` command should the engineer run to ensure the health check probes are successfully evaluated and permitted?
- gcloud compute firewall-rules create allow-health-checks --network=prod-vpc --action=ALLOW --direction=INGRESS --source-ranges=35.191.0.0/16,130.211.0.0/22 --target-tags=web-backend --rules=tcp:80 --priority=500Cevap
- Bgcloud compute firewall-rules create allow-health-checks --network=prod-vpc --action=ALLOW --direction=INGRESS --source-ranges=35.191.0.0/16,130.211.0.0/22 --target-tags=web-backend --rules=tcp:80 --priority=2000
- Cgcloud compute firewall-rules create allow-health-checks --network=prod-vpc --action=ALLOW --direction=INGRESS --destination-ranges=35.191.0.0/16,130.211.0.0/22 --target-tags=web-backend --rules=tcp:80 --priority=500
- Dgcloud compute firewall-rules create allow-health-checks --network=prod-vpc --action=ALLOW --direction=INGRESS --source-ranges=35.191.0.0/16,130.211.0.0/22 --target-tags=web-backend --rules=udp:80 --priority=500
Cevap
Execute the `gcloud compute firewall-rules create` command specifying `--action=ALLOW`, `--direction=INGRESS`, `--source-ranges=35.191.0.0/16,130.211.0.0/22`, `--rules=tcp:80`, and a priority number lower than 1000 (such as 500).
The correct command uses `--priority=500` which evaluates before the existing `--priority=1000` deny rule because lower numbers take precedence in GCP firewall rule ordering. Additionally, it accurately uses `--source-ranges` to specify probe IP origins and `--rules=tcp:80` for the health check protocol.
Adım Adım Çözüm
Anahtar Kavram
VPC Firewall Rule Priority and Health Check Ingress Configuration
Tahmini Süre:1m 30s