Enabling Both AAD and WAF on HUAWEI CLOUD
Scenarios
This topic describes how to configure DNS resolution to implement interworking between AAD and WAF.
Prerequisites
- You have purchased an AAD instance.
- You have purchased WAF and properly configured the protected domain names.
Procedure
- Obtain the WAF CNAME value.
- Log in to the management console.
- Follow the procedure in the following figure to enter the Domains page. Figure 1 Domain configuration entry
- On the Domains page, click the target domain name in the Domain Name column.
- In the Basic Information area, click
for Proxy Configured. 
- In the Proxy Configured dialog box, set Proxy Configured to Yes and click OK.
- In the Basic Information area, copy the access address, subdomain name, and TXT record. Figure 2 WAF information
- Click
in the upper left corner of the page and choose . The Domain Name Service management console is displayed. - Add a record set. Figure 3 Adding a TXT record set
Table 1 Parameter description Parameter
Description
Name
Enter the subdomain name obtained in 1.f.
Type
Select TXT – Specify text records.
Line
Select Default.
TTL (s)
TTL is short for time-to-live, which specifies the cache period of resource records on a local DNS server. If your service address is frequently changed, set TTL to a smaller value.
Value
Enter the TXT record obtained in 1.f.
- Add the obtained WAF CNAME value to an AAD instance.
- Follow the procedure in the following figure to enter the Domain Name Access page. Figure 4 Domain Name Access page
- Click Add Domain Name.
- Enter the domain name information and click Next. Figure 5 Entering domain name information for a website service
Table 2 Parameter description Parameter
Description
Protected Domain Name
Enter the domain name of the service to protect. Wildcard domain names are supported, for example, *.domain.com.
Origin Server Type
- Set this parameter to Domain name.
- Enter the WAF CNAME obtained in 1.
- On the Select Instance and Line page, select the required instances and lines and click Submit and Continue. Figure 6 Select Instance and Line
- On the Modify DNS page, copy the automatically generated AAD CNAME. Click Next. Figure 7 Modifying DNS
- 1. After interworking with WAF is configured, no certificate needs to be uploaded for website services.
- 2. After interworking with WAF is configured, basic web protection and CC attack protection can be disabled.
- Follow the procedure in the following figure to enter the Domain Name Access page.
- Modify DNS configuration.
- Click
in the upper left corner of the page and choose . The Domain Name Service management console is displayed. - Delete the record set whose Type is A.
Deleting the DNS A record set may adversely affect ongoing services. Therefore, you are advised to delete the record set during off-peak hours.
- Click Add Record Set to add a record set. For details, see Table 3. Figure 8 Adding a CNAME record set
Table 3 Parameter description Parameter
Description
Name
Set this parameter to the domain name configured in AAD.
Type
Select CNAME – Map one domain to another.
Line
Select Default.
TTL (s)
TTL is short for time-to-live, which specifies the cache period of resource records on a local DNS server. If your service address is frequently changed, set TTL to a smaller value.
Value
Enter the AAD CNAME obtained in 2.e.
DNS resolution takes a period of time. In most cases, domain names can be resolved within 5 minutes.
- Click
After the preceding steps are complete, traffic is first processed by AAD and then forwarded to WAF, thereby achieving collaborative protection.

Last Article: Obtaining the Source IP Address of a Client
Next Article: Enabling Both AAD and CDN on HUAWEI CLOUD
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.