If your workspace is upgraded from an earlier version of a directory whose ID is in the format of <region ID> + dir + <17 letters and digits>, you can enable Internet access for your cloud desktop by configuring an elastic IP address (EIP) or a NAT gateway. This topic describes how to configure a NAT gateway.

Background information

You can purchase and retain a NAT gateway as an independent resource. After a NAT gateway is associated with one or more EIPs, the gateway can provide Internet access to all cloud desktops connected to a vSwitch of the associated virtual private cloud (VPC). For more information about the billing of NAT gateways, see Billing overview.
Note When you configure a cloud desktop to access the Internet, you can use an EIP or a NAT gateway. For more information about how to configure EIPs, see Configure an EIP.
Perform the following operations to configure a NAT gateway for a cloud desktop:

Step 1: Create a NAT gateway and an EIP

Create a NAT gateway and an EIP, and associate the EIP with the NAT gateway.

  1. Log on to the VPC console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click NAT Gateway.
  4. On the NAT Gateway page, perform the following steps to create a NAT gateway.
    1. Click Create NAT Gateway.
    2. Configure the parameters for the NAT gateway.
      Set the Region and Zone, Zone, VPC ID, and vSwitch ID parameters to those of the cloud desktop. For more information, see Purchase a NAT gateway.
    3. Confirm the configurations and fees and click Buy Now.
  5. On the Elastic IP Addresses page of the VPC console, perform the following operations to create an EIP:
    1. Click Create EIP.
    2. Configure the parameters for the EIP.
      Set the Region and Zone parameter to where the cloud desktop resides. For more information, see Apply for an EIP.
    3. Confirm the configurations and fees and click Buy Now.
  6. Associate the EIP with the NAT gateway.
    1. On the NAT Gateway page, find the created NAT gateway and click Associate Now in the Elastic IP Address column.
    2. In the Associate EIP dialog box, select the EIP with which you want to associate the NAT gateway and click OK.
    Note If you fail to associate the EIP with the NAT gateway, you may have a NAT bandwidth plan within your account. To associate the EIP with the NAT gateway, you must convert the NAT bandwidth plan into an EIP bandwidth plan. For more information, see Why am I unable to associate elastic IP addresses (EIPs) with a NAT gateway in the NAT Gateway console?

Step 2: Create an SNAT entry

SNAT enables cloud desktops without public IP addresses in a VPC to access the Internet by using a NAT gateway.

  1. On the NAT Gateway page of the VPC console, find the NAT gateway created in Step 1 and click Configure SNAT in the Actions column.
  2. In the Used in SNAT Entry section, click Create SNAT Entry.
  3. On the Create SNAT Entry page, configure the parameters.
    1. Click Specify VSwitch.
    2. Select a vSwitch.
      All cloud desktops in the selected vSwith can access the Internet by using SNAT.
    3. Select a public IP address to access the Internet.
    4. Enter an entry name.
  4. Click Confirm.