NAT Gateway is an enterprise-class public network gateway that provides NAT proxy services (SNAT and DNAT), up to 10 Gbps forwarding capacity, and cross-zone disaster recovery. For more information, see What is NAT gateway.
You can provide proxy services that access the Internet by using the SNAT feature of the NAT gateway for ECS instances that do not have public network IP in VPC.
Log on to the VPC console.
In the left-side navigation pane, click NAT Gateway. In the upper-right corner of the NAT Gateway page, click Create NAT Gateway.
Click Buy Now and complete the creation.
For more information about the billing method of the NAT gateway, see billing.
Find the target NAT gateway, and click the Buy Shared Bandwidth Package link.
As a public network gateway, NAT Gateway must have configured with public IPs and bandwidth. The public IPs in the NAT Gateway are abstractly grouped into a shared bandwidth package.
On the Shared Bandwidth Package page, click Buy Shared Bandwidth Package again.
On the purchase page, configure the purchase information and click Buy Now complete the payment.
Return to the NAT gateway page, click the NAT gateway ID, and then click SNAT Table in the left-side navigation pane.
Click Create SNAT entry, configure the SNAT entry according to the following information, Click Confirm.
Configuration Description VSwtich
The VSwitch of the ECS instances that require the Internet access.
By default, all ECS instances in the specified VSwitch can use the specified public IP to access the Internet.
Note: If an ECS instance has already configured a public IP (such as an EIP), the previously configured public IP for the ECS instance is used to access the Internet, rather than using the SNAT proxy service.
VSwitch CIDR Block Display the CIDR block of the selected VSwitch. Public IP
The public IP that is used to access the Internet.
Note: You cannot use a public IP that has already been added to a DNAT entry.
The status of the added SNAT entry is Configuring. Click Refresh to refresh the status. When the status is Available, the SNAT entry has been successfully added.
Now the ECS instance can access Internet. Log on to the ECS instance and use the
pingcommand to test Internet connection.