Step 4: Test the Connection
Scenarios
After adding a DNAT rule, you can perform the following steps to verify the connection:
- Verify that the DNAT rule has been added for the public NAT gateway.
- Check whether ECS 01 in the private network can be accessed by ECS 02 from the Internet through the NAT gateway (EIP 120.46.131.153 bound to the DNAT rule).
Prerequisites
A DNAT rule has been added.
Verifying that the DNAT Rule Has Been Added
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- Click Service List in the upper left corner. Under Networking, select NAT Gateway.
- On the Public NAT Gateways page, click the name of the public NAT gateway.
- In the DNAT Rules tab, view details about the DNAT rule and check whether the DNAT rule has been created.
If Status of the DNAT rule is Running, the DNAT rule has been created.
Verifying that Servers in a VPC Can Be Accessed from the Internet Through the NAT Gateway
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- Hover on in the upper left corner to display Service List and choose Compute > Elastic Cloud Server.
- Log in to ECS 02 with an EIP bound.
- On ECS 02, ping the EIP (120.46.131.153) to check whether ECS 01 on the private network can be accessed by ECS 02 on the public network through the NAT gateway.
Figure 1 Verification result
Figure 2 Failed to be accessed from the Internet
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.