Updated on 2024-03-30 GMT+08:00

Step 4: Add an SNAT Rule

Scenarios

After the private NAT gateway is created, add an SNAT rule so that some or all servers in a VPC subnet can share a transit IP address to access on-premises data centers or other VPCs.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click Service List in the upper left corner. Under Network, select NAT Gateway. In the navigation pane on the left, choose Private NAT Gateways.

    The Private NAT Gateways page is displayed.

  4. In the private NAT gateway list, click the name of the private NAT gateway that you want to add an SNAT rule for.
  5. On the SNAT Rules tab, click Add SNAT Rule.
    Figure 1 Add SNAT Rule
  6. Configure required parameters. For details, see .
    Table 1 Description

    Parameter

    Description

    Subnet

    The subnet type of the SNAT rule. Select Existing or Custom.

    Select a subnet where IP address translation is required in the service VPC.

    Monitoring

    You can create alarm rules to watch the number of SNAT connections.

    Transit IP Address

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

    Description

    Provides supplementary information about the SNAT rule. Enter up to 255 characters. Angle brackets (<>) are not allowed.

  7. Click OK.
  8. View details in the SNAT rule list.

    If Status is Running, the rule has been added.