Adding 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.
Each SNAT rule is configured for one subnet. If there are multiple subnets in a VPC, you can create several SNAT rules to allow them to share transit IP addresses.
Prerequisites
- A private NAT gateway has been created.
- A Direct Connect connection has been created. Its VPC CIDR block has been set to 0.0.0.0/0 when you configure the virtual gateway. For details, see Create a Virtual Gateway.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select the desired region and project. - Under Network, click NAT Gateway.
The NAT gateway console is displayed.
- In the navigation pane on the left, choose NAT Gateway > Private NAT Gateway.
- On the displayed page, click the name of the private NAT gateway for which you want to add the SNAT rule.
- On the SNAT Rules tab, click Add SNAT Rule.
- Specify the parameters as prompted. For details, see Table 1.
Table 1 Parameter descriptions Parameter
Description
Type
You can set it to Subnet or Custom based on service requirements.
- Select Subnet if all servers in a VPC subnet need to access an on-premises data center or a remote VPC through the SNAT rule.
- Select Custom if specific servers in a VPC subnet need to access an on-premises data center or a remote VPC through the SNAT rule.
Subnet
The subnet in which servers can access an on-premises data center or a remote VPC through the SNAT rule.
Transit Subnet
A subnet that does not in the VPC selected when you create the private NAT gateway.
Transit IP Address
The transit IP address that is used to access an on-premises data center or a remote VPC.
You can select a transit IP address that either is not bound to any resource, has been bound to a DNAT rule with Port Type set to Specific port of the current private NAT gateway, or has been bound to an SNAT rule of the current private NAT gateway.
Description
Supplementary information about the private NAT gateway. The description can contain up to 255 characters.
- Click OK.
You can add multiple SNAT rules for a private NAT gateway to suite your service requirements.
Last Article: Managing SNAT Rules
Next Article: Viewing an SNAT Rule
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.