gcloud_compute_routers_nats_create (1)
NAME
- gcloud compute routers nats create - add a NAT to a Google Compute Engine router
SYNOPSIS
-
gcloud compute routers nats create NAME --router=ROUTER (--auto-allocate-nat-external-ips | --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...]) (--nat-all-subnet-ip-ranges | --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME],[...] | --nat-primary-subnet-ip-ranges) [--async] [--icmp-idle-timeout=ICMP_IDLE_TIMEOUT] [--min-ports-per-vm=MIN_PORTS_PER_VM] [--region=REGION] [--tcp-established-idle-timeout=TCP_ESTABLISHED_IDLE_TIMEOUT] [--tcp-transitory-idle-timeout=TCP_TRANSITORY_IDLE_TIMEOUT] [--udp-idle-timeout=UDP_IDLE_TIMEOUT] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
gcloud compute routers nats create is used to create a NAT on a Google
POSITIONAL ARGUMENTS
-
- NAME
-
Name of the NAT to create
REQUIRED FLAGS
-
- --router=ROUTER
-
The Router to use for NAT.
-
Exactly one of these must be specified:
-
- --auto-allocate-nat-external-ips
-
Automatically allocate external IP addresses for Cloud NAT
- --nat-external-ip-pool=IP_ADDRESS,[IP_ADDRESS,...]
-
External IP Addresses to use for NAT
-
-
Exactly one of these must be specified:
-
- --nat-all-subnet-ip-ranges
-
Allow all IP ranges of all subnetworks in the region, including primary and
secondary ranges, to use NAT.
- --nat-custom-subnet-ip-ranges=SUBNETWORK[:RANGE_NAME],[...]
-
List of subnetwork primary and secondary IP ranges to be allowed to use NAT.
[SUBNETWORK]: including a subnetwork name includes only the primary subnet range
of the subnetwork. [SUBNETWORK]:[RANGE_NAME]: specifying a subnetwork and
secondary range name includes only that secondary range.It does not include the
primary range of the subnet.
- --nat-primary-subnet-ip-ranges
-
Allow only primary IP ranges of all subnetworks in the region to use NAT.
-
OPTIONAL FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --icmp-idle-timeout=ICMP_IDLE_TIMEOUT
-
Timeout for ICMP connections. See $ gcloud topic datetimes for information on
duration formats.
- --min-ports-per-vm=MIN_PORTS_PER_VM
-
Minimum ports to be allocated to a VM
- --region=REGION
-
Region of the NAT to create. If not specified, you may be prompted to select a
region.
To avoid prompting when this flag is omitted, you can set the compute/region property:
- $ gcloud config set compute/region REGION
A list of regions can be fetched by running:
- $ gcloud compute regions list
To unset the property, run:
- $ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.
- --tcp-established-idle-timeout=TCP_ESTABLISHED_IDLE_TIMEOUT
-
Timeout for TCP established connections. See $ gcloud topic datetimes for
information on duration formats.
- --tcp-transitory-idle-timeout=TCP_TRANSITORY_IDLE_TIMEOUT
-
Timeout for TCP transitory connections. See $ gcloud topic datetimes for
information on duration formats.
- --udp-idle-timeout=UDP_IDLE_TIMEOUT
-
Timeout for UDP connections. See $ gcloud topic datetimes for information on
duration formats.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
Auto-allocate NAT for all IP addresses of all subnets in the region:
-
$ gcloud compute routers nats create nat1 --router=my-router
--auto-allocate-nat-external-ips --nat-all-subnet-ip-ranges
Specify IP addresses for NAT: Each IP address is the name of a reserved static IP address resource in the same region.
-
$ gcloud compute routers nats create nat1 --router=my-router
--nat-external-ip-pool=ip-address1,ip-address2
Specify subnet ranges for NAT:
By default, NAT works for all primary and secondary IP ranges for all subnets in the region for the given VPC network. You can restrict which subnet primary and secondary ranges can use NAT.
-
$ gcloud compute routers nats create nat1 --router=my-router
--auto-allocate-nat-external-ips
--nat-custom-subnet-ip-ranges=subnet-1,subnet-3:secondary-range-1
NOTES
These variants are also available:
- $ gcloud alpha compute routers nats create $ gcloud beta compute routers nats create