All Products
Document Center

Configure the NAT gateway

Last Updated: Oct 30, 2017

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.


  1. Log on to the VPC console.

  2. In the left-side navigation pane, click NAT Gateway. In the upper-right corner of the NAT Gateway page, click Create NAT Gateway.

  3. Click Buy Now and complete the creation.


    For more information about the billing method of the NAT gateway, see billing.

  4. 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.

  5. On the Shared Bandwidth Package page, click Buy Shared Bandwidth Package again.


  6. On the purchase page, configure the purchase information and click Buy Now complete the payment.

  7. Return to the NAT gateway page, click the NAT gateway ID, and then click SNAT Table in the left-side navigation pane.

  8. Click Create SNAT entry, configure the SNAT entry according to the following information, Click Confirm.


    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.


  9. Now the ECS instance can access Internet. Log on to the ECS instance and use the ping command to test Internet connection.2