How Do I Whitelist Back-to-Source IP Addresses of Cloud WAF?
In cloud CNAME access mode, to let WAF take effect, configure ACL rules on the origin server to trust only the back-to-source IP addresses of all your cloud WAF instances. This prevents hackers from attacking the origin server through the server IP addresses.
![](https://support.huaweicloud.com/intl/en-us/waf_faq/public_sys-resources/notice_3.0-en-us.png)
ACL rules must be configured on the origin server to whitelist WAF back-to-source IP addresses. Otherwise, your website visitors will frequently receive 502 or 504 error code when your website is connected to WAF.
What Are Back-to-Source IP Addresses?
From the perspective of a server, all web requests originate from WAF. The IP addresses used by WAF forwarding are back-to-source IP addresses of WAF. The real client IP address is written into the X-Forwarded-For (XFF) HTTP header field.
![](https://support.huaweicloud.com/intl/en-us/waf_faq/public_sys-resources/note_3.0-en-us.png)
- There will be more WAF back-to-source IP addresses due to scale-out or new clusters. For your legacy domain names, WAF back-to-source IP addresses usually fall into several class C IP addresses (192.0.0.0 to 223.255.255.255) of two to four clusters.
- Generally, these IP addresses do not change unless clusters in use are changed due to disaster recovery switchovers or other scheduling switchovers. Even when WAF cluster is switched over on the WAF background, WAF will check the security group configuration on the origin server to prevent service interruptions.
![](https://support.huaweicloud.com/intl/en-us/waf_faq/en-us_image_0234924841.png)
WAF Back-to-Source IP Address Check Mechanism
A back-to-source IP address is randomly allocated from the back-to-source IP address range. When WAF forwards requests to the origin server, WAF will check the IP address status. If the IP address is abnormal, WAF will remove it and randomly allocate a normal one to receive or send requests.
Why Do I Need to Whitelist the WAF Back-to-Source IP Address Ranges?
All web requests originate from a limited quantity of WAF IP addresses. The security software on the origin server may most likely regard these IP addresses as malicious and block them. Once WAF back-to-source IP addresses are blocked, the website may fail to be accessed or it opens extremely slowly. To fix this, add the WAF back-to-source IP addresses to the whitelist of the security software.
![](https://support.huaweicloud.com/intl/en-us/waf_faq/public_sys-resources/note_3.0-en-us.png)
After you connect your website to WAF, uninstall other security software from the origin server or allow only the requests from WAF to access your origin server. This ensures normal access and protects the origin server from hacking.
Procedure
- Log in to the management console.
- Click
in the upper left corner of the management console and select a region or project.
- Click
in the upper left corner and choose Web Application Firewall under Security & Compliance.
- In the navigation pane, choose Website Settings.
- Above the website list, click WAF Back-to-Source IP Addresses.
Figure 2 WAF Back-to-Source IP Addresses
- In the displayed dialog box, click Copy to copy all the addresses.
Figure 3 WAF Back-to-Source IP Addresses dialog box
- Open the security software on the origin server and add the copied IP addresses to the whitelist.
- If your origin servers are deployed on the Huawei Cloud ECSs, see Whitelisting WAF Back-to-Source IP Addresses on Origin Servers That Are Deployed on ECSs.
- If your origin servers use Huawei Cloud ELB, see Whitelisting WAF Back-to-Source IP Addresses on Origin Servers That Use Huawei Cloud ELB.
- If you also use Cloud Firewall (CFW) on Huawei Cloud, refer to Adding a Protection Rule.
- If your website is deployed on servers on other cloud vendors, whitelist the WAF back-to-source IP addresses in the corresponding security group and access control rules.
- If only the personal antivirus software is installed on the origin server, the software does not have the interface for whitelisting IP addresses. If the origin server provides external web services, install the enterprise security software on or use Huawei Cloud Host Security Service (HSS) for the server. These products identify the sockets of some IP addresses with a large number of requests and occasionally disconnect the connections. Generally, the IP addresses of WAF are not blocked.
Website Connect Issues FAQs
- How Do I Add a Domain Name/IP Address to WAF?
- Which Non-Standard Ports Does WAF Support?
- How Do I Use a Dedicated WAF Instance to Protect Non-Standard Ports That Are Not Supported by the Dedicated Instance?
- How Do I Configure Domain Names to Be Protected When Adding Domain Names?
- Do I Have to Configure the Same Port as That of the Origin Server When Adding a Website to WAF?
- How Do I Whitelist Back-to-Source IP Addresses of Cloud WAF?
- How Do I Configure Non-standard Ports When Adding a Protected Domain Name?
- What Data Is Required for Connecting a Domain Name/IP Address to WAF?
- How Do I Safely Delete a Protected Domain Name?
- How Long Will CNAME Records Be Retained After I Delete a Domain Name from WAF?
- Can I Change the Domain Name That Has Been Added to WAF?
- What Are the Precautions for Configuring Multiple Server Addresses for Backend Servers?
- Does WAF Support Wildcard Domain Names?
- Does WAF Protect Chinese Domain Names?
- How Do I Route Website Traffic to My Cloud WAF Instance?
- What Can I Do If the Message "Illegal server address" Is Displayed When I Add a Domain Name?
- Why Am I Seeing That My Domain Quota Is Insufficient When There Is Still Remaining Quota?
- Can I Configure Multiple Load Balancers for a Dedicated WAF Instance?
- Why Am I Seeing the "Someone else has already added this domain name. Please confirm that the domain name belongs to you" Error Message?
- How Do I Configure the Client Protocol and Server Protocol?
- Why Cannot I Select a Client Protocol When Adding a Domain Name?
- Can I Set the Origin Server Address to a CNAME Record If I Use Cloud WAF?
- How Do I Modify DNS Record on Huawei Cloud DNS?
- How Do I Verify Domain Ownership Using Huawei Cloud DNS?
- How Do I Configure the TXT Record on HUAWEI CLOUD DNS Service?
- What Are Impacts If No Subdomain Name and TXT Record Are Configured?
- How Do I Query a Domain Name Provider?
- How Do I Use A Records for Domain Name Resolution?
- What Are the Differences Between the Old and New CNAME Records?
- Can I Access a Website Using an IP Address After a Domain Name Is Connected to WAF?
- How Do I Test WAF?
- How Can I Forward Requests Directly to the Origin Server Without Passing Through WAF?
- Why Cannot the Protection Mode Be Enabled After a Domain Name Is Connected to WAF?
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.
Chatbotmore