Soru

Zorluk: ZorDeploying Virtual Private Cloud (VPC) Networks, Subnets, and Firewall Rules

A DevOps team is deploying a multi-region network infrastructure using the Google Cloud CLI (`gcloud`). They need to configure a custom-mode Virtual Private Cloud (VPC) named `corp-vpc` with a new primary subnet in `us-central1` (10.20.0.0/2410.20.0.0/24). Additionally, security policies require allowing incoming HTTPS (TCP port 443) traffic exclusively to instances tagged with `frontend`, while ensuring this rule takes precedence over lower-priority default rules. Which TWO actions must be executed to successfully complete this deployment?

  1. Run `gcloud compute networks subnets create corp-subnet-us --network=corp-vpc --region=us-central1 --range=10.20.0.0/24` to provision the regional subnet.Cevap
  2. Run `gcloud compute firewall-rules create allow-frontend-https --network=corp-vpc --allow=tcp:443 --target-tags=frontend --direction=INGRESS --priority=1000` to permit HTTPS traffic to target instances.Cevap
  3. C
    Set the firewall rule priority for the HTTPS allow rule to `65534` to ensure it overrides all other rules in the VPC network.
  4. D
    Apply an IAM deny policy directly on the `corp-subnet-us` resource to block all non-HTTPS ingress network traffic at the subnet boundary.

Cevap

Provisioning the custom subnet using `gcloud compute networks subnets create` with the specified network, region, and CIDR parameters, and creating an ingress firewall rule specifying `--target-tags=frontend`, `--allow=tcp:443`, and a high-precedence priority value such as 1000.
Creating a custom VPC subnet requires executing `gcloud compute networks subnets create` with the associated VPC network, region, and IP address range parameters. Controlling ingress traffic to specific VM instances requires a VPC firewall rule specifying `--direction=INGRESS`, `--target-tags`, `--allow=tcp:443`, and a priority value lower than default rules (such as 1000) to ensure high precedence.

Adım Adım Çözüm

1
Provision the regional subnet using the Google Cloud CLI
Subnet `corp-subnet-us` is created with CIDR range 10.20.0.0/2410.20.0.0/24 in `us-central1` bound to `corp-vpc`.
Custom-mode VPC networks require explicit subnet creation with defined IP ranges per region.
2
Configure the ingress firewall rule with network target tags and priority ordering
Firewall rule `allow-frontend-https` permits TCP port 443 traffic for virtual machines with tag `frontend` with priority 1000.
In GCP firewall evaluation, lower numerical priority numbers (e.g., 1000) take precedence over higher numerical values (up to 65535).

Anahtar Kavram

Deploying custom VPC subnets and configuring target-tagged ingress firewall rules with priority precedence.
Bu soruyu puanla