Create a DNAT Rule

<p>This article describes how to create a DNAT rule.</p> <p><strong><span style="font-size:18px">Prerequisites</span></strong></p> <p>&bull;&nbsp;&nbsp;NAT gateway is created.</p> <p>&bull;&nbsp;Cloud host instance is created in the DMZ network domain of the VPC that the NAT gateway belongs to.</p> <p><strong><span style="font-size:18px">Procedures</span></strong></p> <p>1.&nbsp;Log in to the <a href="https://www.pinganyun.com/console/vpc/overview" target="_blank">VPC Console</a>.</p> <p>2.&nbsp;Click <strong>NAT Gateway</strong> in the left navigation pane to enter the <strong>NAT Gateway</strong> page.</p> <p>3.&nbsp;Select the target region to view the existing NAT gateways of that region.</p> <p>4.&nbsp;Click <strong>host name</strong> of the target NAT gateway to enter the <strong>NAT Detail</strong> page.</p> <p>5.&nbsp;Click the <strong>DNAT Rule </strong>tab.</p> <p>6.&nbsp;Click <strong>Create</strong> in the upper-right corner to enter the <strong>Create DNAT Rule</strong> page.</p> <p>7.&nbsp;Create the DNAT rule based on the following information.</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201707154533-14b96f229dea.png" style="height:556px; width:663px" /></p> <p><strong>Basic Information</strong></p> <table border="1" cellpadding="0" cellspacing="0" style="width:0px"> <tbody> <tr> <td style="background-color:#ededed; width:187px"> <p><strong>Configuration item</strong></p> </td> <td style="background-color:#ededed; vertical-align:top; width:596px"> <p><strong>Description</strong></p> </td> </tr> <tr> <td style="width:187px"> <p>Mapping type</p> </td> <td style="vertical-align:top; width:596px"> <p><strong>IP</strong> and <strong>Port </strong>mapping can be selected.</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201707154612-1f9acb4b966d.png" style="height:21px; margin:1px; width:50px" /><strong>:</strong></p> <p>&bull;&nbsp;When only a few fixed ports are needed to provide services, you can use the port mapping function to maximize the use of a single public IP address.</p> <p>&bull;&nbsp;When unfixed number or a large number of ports are needed, you can use the IP mapping function, so that one ECS instance only needs one public IP.</p> </td> </tr> <tr> <td style="width:187px"> <p>Internet IP</p> </td> <td style="vertical-align:top; width:596px"> <p>Select one public IP. If the type of the DNAT rule is port mapping, you need to enter the port number.</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201707154612-1f9acb4b966d.png" style="height:21px; margin:1px; width:50px" />: The public IP selected is applied when you create the bandwidth package.</p> </td> </tr> <tr> <td style="width:187px"> <p>Private IP</p> </td> <td style="vertical-align:top; width:596px"> <p>You can select the ECS instance in the VPC which provides external services through one of the two following ways:</p> <p>&bull;&nbsp;Click <strong>Select Instance</strong>, and perform the following operations:</p> <p>1.&nbsp;Click <strong>Add Instance</strong>, and the <strong>Add Instance</strong> dialog box will open.</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201707154612-1f9acb4b966d.png" style="height:21px; margin:1px; width:50px" /><strong>:</strong> The ECS instances listed in the dialog box are ECS instances in the DMZ network domain of the VPC where the NAT gateway belongs to.</p> <p>2.&nbsp;Check the ECS instance that needs to access the Internet, and click <strong>Confirm</strong>.</p> <p>3.&nbsp;If the type of the DNAT rule is port mapping, enter the port number.</p> <p>&bull;&nbsp;Click <strong>Custom IP address</strong>, and perform the following operations:</p> <p>1.&nbsp;Fill in the IP address of the ECS instance that needs to access the Internet.</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201707154612-1f9acb4b966d.png" style="height:21px; margin:1px; width:50px" />: Confirm that the IP address is in the DMZ network domain of the VPC that the NAT gateway belongs to.</p> <p>2.&nbsp;If the type of the DNAT rule is port mapping, enter the port number.</p> </td> </tr> <tr> <td style="width:187px"> <p>Protocol type</p> </td> <td style="vertical-align:top; width:596px"> <p>If the type of the DNAT rule is port mapping, you need to select the protocol type. There are two protocol types, including TCP and UDP. You can select one or two protocol types of them.</p> </td> </tr> <tr> <td style="width:187px"> <p>Description</p> </td> <td style="vertical-align:top; width:596px"> <p>Customize the description of the DNAT rule.</p> </td> </tr> </tbody> </table> <p>3.&nbsp;Click <strong>Create</strong> to return to the <strong>DNAT Rule </strong>tab, where you can view the newly created DNAT rule.</p>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products