After you associate an elastic IP address (EIP) with an Internet NAT Gateway, you can configure a DNAT or SNAT entry by using the EIP. This allows Elastic Compute Service (ECS) instances in your virtual private clouds (VPCs) to provide services over the Internet or access the Internet.
Prerequisites
An Internet NAT gateway is created and the Internet NAT Gateway meets the following requirements:
You did not purchase a NAT service plan before January 26, 2018 with the Alibaba Cloud account to which the NAT Gateway belongs. If you did, associate the NAT service plan with the NAT Gateway.
The NAT Gateway and the EIP must be created in the same region.
Procedure
- Log on to the Elastic IP Address console .
In the top navigation bar, select the region where the EIP is created.
On the Elastic IP Addresses page, find the EIP that you created and click Associate with Resource in the Actions column.
In the Associate EIP with Resource dialog box, set the following parameters and click OK.
Parameter
Description
Instance Type
Select NAT Gateway.
You can select only an Internet NAT Gateway.
Resource Group
Select the resource group to which the Internet NAT Gateway belongs.
Select an instance to associate
Select an Internet NAT Gateway.
By default, each Internet NAT Gateway can be associated with at most 20 EIP.
NoteStarting September 19, 2022, if you associate an EIP with a newly created Internet NAT gateway, a private IP address of the vSwitch where the NAT gateway resides is used. Make sure that the vSwitch has sufficient private IP addresses available for use. Otherwise, you cannot associate an EIP with the NAT gateway. Existing NAT gateways are not affected.