Help Center> Anti-DDoS Service> Best Practices> Enabling Both AAD and WAF on HUAWEI CLOUD

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

  1. Obtain the WAF CNAME value.

    1. Log in to the management console.
    2. Follow the procedure in the following figure to enter the Domains page.
      Figure 1 Domain configuration entry
    3. On the Domains page, click the target domain name in the Domain Name column.
    4. In the Basic Information area, click for Proxy Configured.

    5. In the Proxy Configured dialog box, set Proxy Configured to Yes and click OK.
    6. In the Basic Information area, copy the access address, subdomain name, and TXT record.
      Figure 2 WAF information
    7. Click in the upper left corner of the page and choose Network > Domain Name Service. The Domain Name Service management console is displayed.
    8. 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.

  2. Add the obtained WAF CNAME value to an AAD instance.

    1. Follow the procedure in the following figure to enter the Domain Name Access page.
      Figure 4 Domain Name Access page
    2. Click Add Domain Name.
    3. 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.
    4. On the Select Instance and Line page, select the required instances and lines and click Submit and Continue.
      Figure 6 Select Instance and Line
    5. 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.

  3. Modify DNS configuration.

    1. Click in the upper left corner of the page and choose Network > Domain Name Service. The Domain Name Service management console is displayed.
    2. 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.

    3. 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.

After the preceding steps are complete, traffic is first processed by AAD and then forwarded to WAF, thereby achieving collaborative protection.