Help Center> Web Application Firewall> FAQ> Service Interruption Check> Why Is the Access Status of a Domain Name or IP Address Inaccessible?

Why Is the Access Status of a Domain Name or IP Address Inaccessible?

Symptoms

After a domain name or IP address is added to WAF, the connection between WAF and the domain name or IP address fails to be established. Figure 1 shows an example.

Figure 1 Inaccessible domain name or IP address

WAF automatically checks the access status of protected websites every hour. If WAF detects that a protected website has received 20 access requests within 5 minutes, it considers that the website has been successfully connected to WAF.

WAF offers the cloud, dedicated, and ELB mode to protect websites. You can add either domain names or IP addresses to WAF. Before you start, get familiar with the following differences:
  • Cloud mode: protects your web applications on HUAWEI CLOUD, other cloud platforms, or on-premises data centers through domain names.
  • Dedicated or ELB mode: protects your web applications on HUAWEI CLOUD through domain names or IP addresses.

Troubleshooting and Solutions for Cloud Mode

Refer to Figure 2 and Table 1 to fix connection failures.

Figure 2 Troubleshooting for cloud mode
Table 1 Solutions for cloud mode

Possible Cause

Solution

Cause 1: Access Status of Protected Website not updated

In the Access Status column for the protected website, click to update the status.

Cause 2: Website access traffic not enough for WAF to consider the website accessible

NOTICE:

After you connect a website to WAF, the website is considered accessible only when WAF detects at least 20 requests to the website within 5 minutes.

  1. Access the protected website for many times within 1 minute.
  2. In the Access Status column for the website, click to update the status.

Cause 3: Incorrect domain name settings

NOTICE:
WAF can protect the website using the following types of domain names:
  • Top-level domain names, for example, example.com
  • Single domain names/Second-level domains, for example, www.example.com
  • Wildcard domain names, for example, *.example.com

Domain names example.com and www.example.com are different. Ensure that correct domain names are added to WAF.

Perform the following steps to ensure that the domain name settings are correct.

  1. In Windows OSs, choose Start > Run. Then enter cmd and press Enter.
  2. Ping the CNAME record (for example, ping e59e684e2278043ae98a5423aef8ee329.vip.huaweicloudwaf.com) of the domain name to obtain the WAF back-to-source IP address.
  3. Use a text editor such as Notepad or Notepad++ to open the hosts file. Generally, the hosts file is stored in the C:\Windows\System32\drivers\etc\ directory.
  4. Add a record into the hosts file in the format of DomainName WAF back-to-source IP address.
  5. Save the hosts file after the record is added. In the CLI, run the ping Domain name added to WAF command, for example, ping www.example.com.

    If the WAF back-to-source IP address in 2 is displayed in the command output, the domain name settings are correct.

For details, see Testing WAF.

If there are incorrect domain name settings, remove the domain name from WAF and add it to WAF again.

Cause 4: DNS record or the back-to-source IP addresses of proxies not configured

Check whether the website connected to WAF uses proxies such as advanced anti-DDoS, CDN, and cloud acceleration service.
  • If yes, ensure that Proxy Configured is set to Yes for the website.
    • Change the back-to-source IP address of the proxy such as CDN to the CNAME record of WAF.
    • (Optional) Add a WAF subdomain name and TXT record at your DNS provider.
  • If no, contact your DNS service provider to configure a CNAME record for the domain name.

For details, see Connecting a Domain Name to WAF.

Cause 5: Incorrect DNS record or proxy back-to-source address

Perform the following steps to check whether the domain name CNAME record takes effect:

  1. In Windows OSs, choose Start > Run. Then enter cmd and press Enter.
  2. Run a nslookup command to query the CNAME record.

    If the command output displays the CNAME record of WAF, the record takes effect.

    Using www.example.com as an example, the output is as follows:

    nslookup www.example.com

If the CNAME record fails to take effect, modify the DNS record or back-to-source address. For details, see Connecting a Domain Name to WAF.

Troubleshooting and Solutions for Dedicated Mode

Refer to Figure 3 and Table 2 to fix connection failures.

Figure 3 Troubleshooting for dedicated mode
Table 2 Solutions for dedicated mode

Possible Cause

Solution

Cause 1: Access Status for Domain Name/IP Address not updated

In the Access Status column for the protected website, click to update the status.

Cause 2: Website access traffic not enough for WAF to consider the website accessible

NOTICE:

After you connect a website to WAF, the website is considered accessible only when WAF detects at least 20 requests to the website within 5 minutes.

  1. Access the protected website for many times within 1 minute.
  2. In the Access Status column for the website, click to update the status.

Cause 3: Incorrect domain name or IP address settings

View the basic information about the domain name and check whether the domain name or IP address settings are correct.

If there are incorrect settings for the domain name or IP address, remove this domain name or IP address from WAF and add it to WAF again.

Cause 4: No load balancer configured for the dedicated WAF instance or no EIP bound to the load balancer configured for the dedicated WAF instance

  1. Configure a load balancer for the dedicated WAF instance.
  2. Bind an EIP to the load balancer.

Cause 5: Incorrect load balancer configured or incorrect EIP bound to the load balancer

Cause 6: Domain name or IP address not registered with the MIIT

Register the domain name or IP address with the MIIT and connect the domain name or IP address to the dedicated WAF instance again.

Troubleshooting and Solutions for ELB Mode

Refer to Figure 4 and Table 3 to fix connection failures.

Figure 4 Troubleshooting for ELB mode
Table 3 Solutions for ELB mode

Possible Cause

Solution

Cause 1: Access Status for Domain Name/IP Address not updated

In the Access Status column for the protected website, click to update the status.

Cause 2: Website access traffic not enough for WAF to consider the website accessible

NOTICE:

After you connect a website to WAF, the website is considered accessible only when WAF detects at least 20 requests to the website within 5 minutes.

  1. Access the protected website for many times within 1 minute.
  2. In the Access Status column for the website, click to update the status.

Cause 3: Incorrect domain name or IP address settings

View the basic information about the domain name and check whether the domain name or IP address settings are correct.

If there are incorrect settings, remove the domain name or IP address from WAF and add it to WAF again.

Cause 4: No dedicated load balancer configured for the load-balancing WAF instance

Bind a dedicated load balancer to the WAF instance.

Cause 5: Incorrect load balancer bound to the load-balancing WAF instance

Only a dedicated load balancer that is in the same VPC as the load-balancing WAF instance can work.

Cause 6: Domain name or IP address not registered with the MIIT

Register the domain name or IP address with the MIIT and connect the domain name or IP address to the load-balancing WAF instance again.