Skip to main content

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

  1. On the NAT Gateways page, click the Set DNAT button in the operation column. fg-dc-nat-3.3.2-1

  2. On the DNAT management tab, click the Create DNAT entry button. fg-dc-nat-3.3.2-2

  3. On the Create DNAT entry section, configure the parameters.

ParameterDescription
Public IP addressSelect an elastic IP address (EIP).
Note An EIP specified in an SNAT entry cannot be specified in a DNAT entry.
Private IP addressSelect 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 settingsChoose 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.
  1. On the Create DNAT entry section, click the OK button.

fg-dc-nat-3.3.2-3