01 Sign in to your Trend Cloud One™ account to access the Limit NAT to Specific Subnets Only rule settings and identify the VPC subnets authorized to use Cloud NAT.
02 Run projects list command (Windows/macOS/Linux) with custom output filters to list the ID of each project available in your Google Cloud Platform (GCP) account:
gcloud projects list
--format="value(projectId)"
03 The command output should return the requested GCP project identifiers (IDs):
cc-project5-123123
cc-ai-project-123123
04 Run compute networks list command (Windows/macOS/Linux) with custom output filters to list the name of each VPC network created for the selected GCP project:
gcloud compute networks list
--project=cc-project5-123123
--format="value(name)"
05 The command output should return the requested VPC network names:
cc-project5-network
cc-custom-vpc-network
06 Run compute routers list command (Windows/macOS/Linux) to describe the name of the Compute Engine router (also known as Cloud Router) created for the specified VPC network. Cloud NAT uses Cloud Routers to group NAT configuration information:
gcloud compute routers list
--project=cc-project5-123123
--filter="network:(cc-project5-network)"
--format="value(name)"
07 The command output should return the name of the requested Cloud Router:
08 Run compute routers nats list command (Windows/macOS/Linux) to describe the Cloud NAT gateways deployed for the specified Cloud Router, in the selected VPC network:
gcloud compute routers nats list
--region=us-central1
--router=cc-project5-nat-router
--format="value(name)"
09 The command output should return the name of each NAT gateway deployed for your router:
cc-project5-nat-gateway
cc-web-platfom-nat-gateway
10 Run compute routers nats describe command (Windows/macOS/Linux) to describe the VPC subnets configured for the selected Cloud NAT gateway:
gcloud compute routers nats describe cc-project5-nat-gateway
--region=us-central1
--router=cc-project5-nat-router
--format="default(subnetworks)"
11 The command output should return the URIs of the associated VPC subnets:
- name: https://www.googleapis.com/compute/v1/projects/cc-project5-123123/regions/us-central1/subnetworks/cc-project5-subnet-003
sourceIpRangesToNat:
- ALL_IP_RANGES
- name: https://www.googleapis.com/compute/v1/projects/cc-project5-123123/regions/us-central1/subnetworks/cc-project5-subnet-004
sourceIpRangesToNat:
- ALL_IP_RANGES
- name: https://www.googleapis.com/compute/v1/projects/cc-project5-123123/regions/us-central1/subnetworks/cc-project5-subnet-005
sourceIpRangesToNat:
- ALL_IP_RANGES
- name: https://www.googleapis.com/compute/v1/projects/cc-project5-123123/regions/us-central1/subnetworks/cc-project5-subnet-008
sourceIpRangesToNat:
- ALL_IP_RANGES
Check the
compute routers nats describe command output to identify the VPC subnets associated with your NAT gateway. If one or more VPC subnets mapped to your gateway are not defined in the conformity rule settings identified in step 1, the selected Cloud NAT gateway is not limited to specific subnets. Consequently, your Cloud NAT configuration is not compliant.
12 Repeat steps no. 10 - 11 for each NAT gateway deployed for the selected GCP project.
13 Repeat steps no. 3 – 12 for each GCP project available in your Google Cloud account.