Create a DNAT entry
Overview
This topic describes how to create a DNAT entry. DNAT can map public IP addresses of NAT Gateway to Elastic Compute Service (ECS) instances. This way, the ECS instances can provide Internet-facing services. DNAT supports port mapping and IP mapping.
Procedure
On the NAT Gateways page, click the Set DNAT button in the operation column.
On the DNAT management tab, click the Create DNAT entry button.
On the Create DNAT entry section, configure the parameters.
Parameter | Description |
---|---|
Public IP address | Select an elastic IP address (EIP). Note An EIP specified in an SNAT entry cannot be specified in a DNAT entry. |
Private IP address | Select the ECS instance that uses the DNAT entry to provide Internet-facing services. . You can specify the private IP address of the ECS instance in the following ways: Select from the corresponding IP of ECS or ENI: Select the ECS instance from the drop-down list. Self-filling : Enter the private IP address of the ECS instance. Note This private IP address must fall all within the CIDR block of the virtual private cloud (VPC). You can also enter the private IP address of an existing ECS instance. |
Port settings | Choose a DNAT mapping method: All ports: specifies IP mapping. All requests destined for the EIP are forwarded to the ECS instance. Specific Port: specifies port mapping. The NAT gateway forwards requests to the specified ECS instance based on the specified protocol and ports. After you select Specific Port, set the following parameters: Public network port, Private network port, and Protocol type. |
- On the Create DNAT entry section, click the OK button.