Step 4: Add an SNAT Rule

Scenarios

After the private NAT gateway is created, you need to add SNAT rules. An SNAT rule allows all or some servers in a VPC subnet to access your on-premises data center or remote VPC by sharing a transit IP address.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. On the console homepage, under Network, click NAT Gateway. In the navigation pane on the left, choose Private NAT Gateway.

    The private NAT gateway console is displayed.

  4. In the NAT gateway list, click the name of the private NAT gateway for which you want to add the SNAT rule.
  5. On the SNAT Rules tab, click Add SNAT Rule.
    Figure 1 Add SNAT Rule
  6. Specify the parameters as prompted. For details, see Table 1.
    Table 1 Parameter descriptions

    Parameter

    Description

    Type

    Specifies whether servers in a VPC subnet or a subset of a current VPC subnet need to use the SNAT rule.

    Subnet

    A service VPC subnet where IP addresses need translation.

    Transit Subnet

    The transit subnet created in Step 3: Create a Private NAT Gateway.

    Transit IP Address

    The transit IP address assigned in Step 3: Create a Private NAT Gateway.

    Description

    Supplementary information about the SNAT rule. The description can contain up to 255 characters.

  7. Click OK.
  8. View details in the SNAT rule list. If Status is Running, the rule has been added.