Internet NAT gateways support the DNAT feature. DNAT can map an elastic IP address (EIP) to the private IP address of an Elastic Compute Service (ECS) instance through port mapping or IP mapping. This way, the ECS instance can provide services over the Internet. This topic describes how to create and manage DNAT entries.
Background information
Prerequisites
An Internet NAT gateway is created and an EIP is associated with the Internet NAT gateway. For more information, see Create a NAT gateway and Associate an elastic IP address (EIP) with an Internet NAT gateway.
Create a DNAT entry
Modify a DNAT entry
After you create a DNAT entry, you can modify the public IP address, private IP address, port settings, and name of the DNAT entry.
- Log on to the NAT Gateway console.
- In the top navigation bar, select the region where you want to create the NAT gateway.
- On the Internet NAT Gateway page, find the NAT gateway that you want to manage and click Configure DNAT in the Actions column.
- In the DNAT Entry List section, find the DNAT entry that you want to manage and click Edit in the Actions column.
- On the Edit DNAT Entry page, modify the public IP address, private IP address, port settings, and name of the DNAT entry. Then, click Confirm.
Delete a DNAT entry
If you no longer need an ECS instance to provide Internet-facing services, you can delete the DNAT entry created for the ECS instance.
- Log on to the NAT Gateway console.
- In the top navigation bar, select the region where you want to create the NAT gateway.
- On the Internet NAT Gateway page, find the NAT gateway that you want to manage and click Configure DNAT in the Actions column.
- In the DNAT Entry List section, find the DNAT entry that you want to manage and click Delete in the Actions column.
- In the message that appears, click OK.
References
- CreateForwardEntry: creates a DNAT entry.
- ModifyForwardEntry: modifies a DNAT entry.
- DeleteForwardEntry: deletes a DNAT entry.