tencent cloud

All product documents
Managing DNAT Rules
Last updated: 2024-08-01 14:17:17
Managing DNAT Rules
Last updated: 2024-08-01 14:17:17
The DNAT (Destination Network Address Translation) feature supports mapping the private IPs, protocols, and ports of CVMs within a VPC to other IPs, protocols, and ports, thereby enabling the resources on the CVMs to be accessed by other networks, with their original addresses hidden.

Creating DNAT Rules

1. Log in to the NAT Gateway console and click Private NAT Gateway in the left sidebar.
2. On the private NAT gateway list page, click the private NAT gateway instance for which you need to query the DNAT rules, to enter the details page.
3. On the private NAT gateway instance details page, click the DNAT tab > Create, select the protocol, original IP, original port, mapped IP, and mapped port, and then click Confirm.
Original IP and original port: indicate the IP address and port of the local subnet in the VPC, namely the IP address and port to be translated.
Mapped IP and mapped port: indicate the translated IP and port. The original IP and port provide services through this mapped IP and port.
Only active access from the peer network to the VPC is supported. The peer network must access the mapped IP and port to communicate with the original IP and port in the VPC. Response packets are not affected.
The range for original ports and mapped ports is 1-65,535.
Batch adding supports up to 50 rules in each batch. If there are many rules, you can add them in multiple batches.

Querying DNAT Rules

1. Log in to the NAT Gateway console and click Private NAT Gateway in the left sidebar.
2. On the private NAT gateway list page, click the private NAT gateway instance for which you want to query the DNAT rules, to enter the details page.
3. On the private NAT gateway instance details page, click the DNAT tab. In the search box on the right, you can query by protocol, original IP, original port, mapped IP, and mapped port.

Modifying DNAT Rules

1. Log in to the NAT Gateway console and click Private NAT Gateway in the left sidebar.
2. On the private NAT gateway list page, click the private NAT gateway instance for which you want to modify the DNAT rules, to enter the details page.
3. On the private NAT gateway instance details page, click the DNAT tab, select a specific DNAT rule, and click Modify in the Operation column. Then you can modify the corresponding rule based on the protocol, original IP, original port, mapped IP, and mapped port.

Deleting DNAT Rules

Deleting DNAT rules supports Single Deletion and Batch Deletion.
Single Deletion:
1. Log in to the NAT Gateway console and click Private NAT Gateway in the left sidebar.
2. On the private NAT gateway list page, click the private NAT gateway instance for which you want to delete the DNAT rules, and enter the details page.
3. On the private NAT gateway instance details page, click the DNAT tab, select a specific DNAT rule, and click Delete in the Operation column to delete the corresponding single rule.
Batch Deletion:
On the private NAT gateway instance details page, click the DNAT tab, select multiple DNAT rules on the left side, and click Delete above the list to batch delete the DNAT rules.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support