Configuring Private Domain Name Resolution for ECSs
Scenarios
If you have deployed ECSs and other cloud services in a VPC, you can configure private domain names for the ECSs so that they can communicate with each other or access the cloud services over a private network.
This section uses ECSs as an example to describe how to create a private zone and add a record set to it.
Video Tutorial
This video shows how to configure private domain names for ECSs in a VPC to communicate with each other.
Preparations
This section uses a Huawei Cloud ECS as an example. Before configuring private domain name resolution, log in to the ECS console to check the private IP address of your ECS.
Step 1: Create a Private Zone
Before using a private domain name (for example, example.com) to access an ECS, you need to create a private zone.
- Go to the Private Zones page.
- Click
in the upper left corner and select the desired region and project.
- In the upper right corner of the page, click Create Private Zone.
- On the Create Private Zone page, set parameters as instructed.
- Click OK.
Step 2: Add an A Record Set
Add an A record set for the created private zone.
- In the private zone list, click Manage Record Sets in the Operation column of the target private zone.
- On the Record Sets tab, click Add Record Set.
- Configure the parameters as follows:
- Name: Leave it blank.
- Type: Select A – Map domains to IPv4 addresses.
- Value: Enter the private IP address of the ECS.
Retain the default values of other parameters.
- Click OK.
- Switch back to the Record Sets tab.
The added record set is in the Normal state.
Step 3: Change the DNS Servers for the VPC Subnet
To make the private zone and its record sets take effect in a VPC, ensure that the VPC subnets associated with the ECS use the private DNS server addresses provided by the DNS service.
- View the DNS server addresses for the VPC subnet associated with the ECS.
- Go to the ECS list page.
- In the ECS list, click the name of the target ECS.
- On the Summary tab of the ECS details page, click the name of the VPC subnet associated with the ECS NIC.
- In the Gateway and DNS Information area, view the DNS server addresses used by the ECS.
- View the private DNS server addresses provided by the DNS service.
- Method 1 (recommended): View the private DNS server addresses on the management console.
- Go to the Private Zones page.
- Click
in the upper left corner and select the desired region and project.
- In the private zone list, locate the private zone and click the domain name.
View the private DNS server addresses on the top of the record set list.
- Method 2: View the private DNS server addresses for each region by referring to What Are Huawei Cloud Private DNS Server Addresses?
Check whether the private DNS server addresses are the same as the DNS server addresses for the VPC subnet obtained in 1. If they are different, go to 3.
- Method 1 (recommended): View the private DNS server addresses on the management console.
- Change the DNS server addresses for the VPC subnet.
Return to the VPC subnet summary page in 1.d and click
next to DNS Server Address.
Change the DNS server address of the VPC subnet to the private DNS server address of Huawei Cloud as instructed.
Step 4: Check Whether the Record Set Takes Effect
Log in to the ECS and run nslookup domain name.
Example: nslookup example.com
As shown in the following figure, when the displayed IP address is the same as the IP address configured in the A record set, the record set has taken effect.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot