All Products
Search
Document Center

:FAQ about WAF

Last Updated:Jun 07, 2024

This topic provides answers to some frequently asked questions about Web Application Firewall (WAF).

Overview

Can I use WAF to protect servers that are not deployed on Alibaba Cloud?

Yes, you can use WAF to protect servers that are not deployed on Alibaba Cloud. WAF protects all servers that can be accessed over the Internet. The servers can be deployed on Alibaba Cloud, on third-party clouds, or in data centers.

Important

If you want to add domain names to a WAF instance in the Chinese mainland, you must complete an Internet Content Provider (ICP) filing for the domain names as required by the Ministry of Industry and Information Technology (MIIT). If the domain names do not have an ICP filing, the domain names cannot be added to a WAF instance.

Does WAF support Cloud Web Hosting instances?

Yes, all editions of WAF support exclusive Cloud Web Hosting instances. After you activate WAF, you can configure exclusive instances in the WAF console.

Shared Cloud Web Hosting instances use shared IP addresses. Therefore, multiple users share the same origin server. We recommend that you do not separately configure WAF for shared Cloud Web Hosting instances.

Can WAF protect HTTPS services?

Yes, all editions of WAF can protect HTTPS services. You can add wildcard domain names to WAF.

To protect HTTPS services, you must upload SSL certificates and private key files as prompted. After HTTPS-enabled websites are added to WAF, WAF decrypts access requests, checks request packets, encrypts the requests, and then forwards the requests to origin servers.

Does WAF support custom ports?

WAF Business Edition and WAF Enterprise Edition support custom ports. WAF Business Edition supports up to 10 custom ports, and WAF Enterprise Edition supports up to 50 custom ports.

Important

WAF supports custom ports only within a specific port range. The non-standard ports must be within the allowed port range. For more information, see View the ports supported by WAF.

What are the restrictions on the ports that can be added to WAF?

WAF supports only specific HTTP or HTTPS ports. The supported ports vary between different editions of WAF. For more information, see View the ports supported by WAF.

Security risks may be caused by vulnerable ports, and Internet service providers (ISPs) may block service traffic that is destined for vulnerable ports. The following ports are vulnerable TCP ports: 42, 135, 137, 138, 139, 445, 593, 1025, 1434, 1068, 3127, 3128, 3129, 3130, 4444, 5554, 5800, 5900, and 9996. If a website that is protected by WAF uses vulnerable ports, the website may be inaccessible in specific regions. Before you add your web service to WAF, make sure that the website does not use vulnerable ports.

Does the QPS limit that is configured for a WAF instance in the WAF console apply to the entire WAF instance or a single domain name that is added to the WAF instance?

The queries per second (QPS) limit applies to the entire WAF instance.

For example, if you add three domain names to a WAF instance in the WAF console, the total QPS of the domain names cannot exceed the configured QPS limit. If the total QPS exceeds the limit, WAF triggers throttling and may randomly discard packets.

Does WAF support mutual TLS authentication?

The CNAME record and transparent proxy modes do not support mutual TLS authentication. The service integration mode of WAF 3.0 supports mutual TLS authentication. Web services that use one of the following cloud services can be added to WAF in service integration mode on the Cloud Native tab of the Website Configuration page in the WAF 3.0 console: Application Load Balancer (ALB), Microservices Engine (MSE), Function Compute, and Serverless App Engine (SAE).

Does WAF support the WebSocket, HTTP/2, or SPDY protocol?

All editions of WAF support WebSocket. WAF Business Edition and more advanced editions support HTTP/2. WAF does not support SPDY.

To prevent attackers from using HTTP/2 over cleartext (H2C) smuggling to bypass WAF, you can create a custom rule to block requests whose Header name is Upgrade and value is h2c. For more information, see Configure custom rules to defend against specific requests (WAF 3.0) and Create a custom protection policy (WAF 2.0).

Is the origin server affected when HTTP/2 services are added to WAF?

Yes, the origin server is affected. If you add HTTP/2 services to WAF, WAF can handle HTTP/2 requests from clients. However, WAF forwards requests to the origin server only over HTTP/1.0 or HTTP/1.1. If you add HTTP/2 services to WAF, HTTP/2 multiplexing cannot work as expected and the clean bandwidth of the origin server increases.

What are the TLS protocols supported by WAF?

WAF instances that reside in the Chinese mainland support TLS 1.0, TLS 1.1, and TLS 1.2. WAF instances that reside outside the Chinese mainland support TLS 1.1 and TLS 1.2.

If you have specific requirements, you can configure custom TLS settings. For example, you can disable TLS 1.0 and enable TLS 1.3 for your WAF instance. For more information, see Configure custom TLS settings.

Can WAF protect websites that use NTLM authentication?

No, WAF cannot protect websites that use New Technology LAN Manager (NTLM) authentication. If your website uses NTLM authentication, the access requests that are forwarded by WAF may fail the NTLM authentication of an origin server. As a result, authentication prompts may be repeatedly displayed on the client. We recommend that you use a different authentication method for your website.

Can I use the internal IP address of an ECS instance as an origin IP address in the WAF console?

No, you cannot use the internal IP address of an Elastic Compute Service (ECS) instance as an origin IP address. This is because WAF forwards requests to an origin server over the Internet.

Can WAF protect multiple origin IP addresses for one domain name?

Yes, you can enter up to 20 origin IP addresses when you add a domain name in the WAF console.

How does WAF balance request loads among multiple origin servers?

If you use multiple origin servers, WAF automatically uses the IP hash method to balance request loads among the origin servers. You can also use other load balancing algorithms based on your business requirements. For more information, see Add a domain name to WAF.

Does WAF support the health check feature?

Yes, WAF supports the health check feature. By default, the health check feature is enabled. WAF checks the availability of origin IP addresses. If an origin server is unavailable, WAF forwards the requests to another origin server.

Note

If an origin server does not respond, WAF automatically sets a cooldown period for the origin server. During this period, WAF forwards the requests to another origin server. After the origin server recovers, new requests can be forwarded to it again. For more information about the health check feature, see How CLB health checks work.

Does a delay occur when I change an origin IP address in the WAF console?

Yes, a delay occurs when you change an origin IP address. The new IP address requires approximately 1 minute to take effect.

What are the back-to-origin CIDR blocks of WAF?

To view the back-to-origin CIDR blocks of WAF, log on to the WAF console and choose Systems > Service Information. For more information, see Allow access from back-to-origin CIDR blocks of WAF.

Are the back-to-origin CIDR blocks of WAF automatically added to security groups?

No, the back-to-origin CIDR blocks of WAF are not automatically added to security groups. If you deploy other firewalls or host protection software for origin servers, we recommend that you add the back-to-origin CIDR blocks of WAF to the whitelists of those firewalls and software.

We recommend that you configure protection policies for the origin servers. For more information, see Configure protection for an origin server.

Do I need to allow access requests from all client IP addresses?

You can allow access requests from all client IP addresses or only from the back-to-origin CIDR blocks of WAF. We recommend that you allow access requests only from the back-to-origin CIDR blocks of WAF to protect the origin servers of your web services.

Can a WAF instance that uses an exclusive IP address defend against DDoS attacks?

Yes, a WAF instance that uses an exclusive IP address can defend against DDoS attacks.

WAF provides exclusive IP addresses for users. Blackhole filtering, which is used to protect the IP addresses of ECS and Server Load Balancer (SLB) instances from DDoS attacks, can also be used to protect the exclusive IP addresses. The default DDoS mitigation capability provided by a WAF instance that uses an exclusive IP address is the same as the DDoS mitigation capability of an ECS instance in the region where WAF is deployed.

Can WAF be deployed together with CDN or with Anti-DDoS Pro or Anti-DDoS Premium?

Yes, WAF is fully compatible with CDN and Anti-DDoS Proxy. If you want to deploy WAF together with CDN and Anti-DDoS Proxy, we recommend that you deploy the components in the following sequence: client, Anti-DDoS Proxy, CDN, WAF, SLB, and origin server.

If you want to deploy WAF together with CDN or Anti-DDoS Proxy, set the address of the origin server to the CNAME assigned by WAF when you add a domain name to CDN or Anti-DDoS Proxy. When the address of the origin server is set to the CNAME assigned by WAF, requests are forwarded by CDN or Anti-DDoS Proxy to WAF and then to the origin server. For more information, see Protect a website service by using Anti-DDoS Proxy and WAF and Use WAF together with CDN.

Can I deploy WAF together with CDN and Anti-DDoS Proxy by using different Alibaba Cloud accounts?

Yes, you can deploy WAF together with CDN and Anti-DDoS Proxy by using different accounts. This allows you to defend against DDoS attacks and web application attacks.

How does WAF ensure the security of an uploaded certificate and the private key of the certificate? Does WAF decrypt HTTPS traffic and record the content of HTTPS requests?

If you use WAF to protect HTTPS services, you must upload the required SSL certificate and the private key of the certificate. This way, WAF can decrypt HTTPS traffic to detect attacks and analyze the characteristics of the attacks. Alibaba Cloud uses a dedicated key server to store and manage private keys. The key server is based on Alibaba Cloud Key Management Service (KMS) and can ensure the data security, integrity, and availability of certificates and private keys. This helps meet classified protection and compliance requirements. For more information about KMS, see What is Key Management Service?

WAF uses an uploaded certificate and the private key of the certificate to decrypt HTTPS traffic only in scenarios in which attacks are detected in real time. WAF records only specific content of request payloads. The content is determined based on attack characteristics. Then, WAF provides attack reports and data statistics based on the content. WAF can record the full content of requests or responses only when WAF is granted the required permissions.

WAF complies with various authoritative standards, including ISO 9001, ISO 20000, ISO 22301, ISO 27001, ISO 27017, ISO 27018, ISO 27701, ISO 29151, BS 10012, Cloud Security Alliance (CSA) STAR, MLPS level 3, Service Organization Control (SOC) 1, SOC 2, SOC 3, Cloud Computing Compliance Criteria Catalogue (C5), Green Finance Certification Scheme developed by Hong Kong Quality Assurance Agency (HKQAA), Outsourced Service Providers Audit Report (OSPAR), and Payment Card Industry Data Security Standard (PCI DSS). The standards also include those that prove the effectiveness of WAF across financial sectors in Hong Kong (China). WAF also provides the same security and compliance qualifications as Alibaba Cloud. For more information, visit Alibaba Cloud Trust Center.

Note

If you use WAF to protect HTTPS services, you can use a dual-certificate method. This method allows you to independently use a set of certificates and private keys on your WAF instance and the origin server. The two sets of certificates and private keys must be valid. This way, the key server can separately manage the certificates and keys.

A domain name is added to WAF. Why am I unable to find the domain name in the domain name list?

The domain name may have been automatically removed by WAF. This happens when the ICP filing information of the domain name is invalid. You must complete an ICP filing for the domain name and add the domain name to WAF again. For more information about ICP filing, see ICP filing application overview.

Important

Before you add a website to WAF in the Chinese mainland, make sure that the ICP filing information of the domain name is valid. To meet the requirements of laws and regulations, WAF removes domain names whose ICP filing information is invalid on a regular basis.

How can I use WAF to defend against HTTP flood attacks?

WAF provides various protection modes to defend against HTTP flood attacks. You can select a mode based on your business requirements. For more information, see Configure HTTP flood protection.

To achieve better protection and reduce the occurrence of false positives, you can use WAF Business Edition or WAF Enterprise Edition in which security experts tailor protection algorithms specific to your business. For more information, see Create a custom protection policy.

How long does it take for configuration modifications in the WAF console to take effect?

In most cases, configuration modifications take effect within 1 minute.

When I configure custom protection policies (ACL policies) in the WAF console, can I enter CIDR blocks in the IP field?

Yes, you can enter CIDR blocks in the IP field when you configure custom protection policies in the WAF console.

Why does a custom protection policy whose URL match field contains a double forward slash (//) not take effect?

When the rules engine of WAF processes the URL match field, the rules engine compresses consecutive forward slashes (/). Therefore, the rules engine cannot match the custom protection policy because the URL match field contains a double forward slash (//).

If you want to define an ACL policy in which the URL match field contains a double forward slash (//), enter a single forward slash (/) instead. For example, if you want to set the URL match field to //api/sms/request, enter /api/sms/request. This way, WAF can implement access control based on the policy.

Can I view the source IP addresses of HTTP flood attacks in the WAF console?

Yes, you can view the source IP addresses of HTTP flood attacks after you enable the Simple Log Service for WAF feature. For more information, see Get started with the Simple Log Service for WAF feature and Query logs.

How do I query the bandwidth usage of WAF?

You can query the bandwidth usage of WAF on the Overview page in the WAF console.

How does WAF improve the access security of business account APIs?

As the business and scale of enterprises continue to grow, the number of attacks is also increasing exponentially. Websites with more valuable accounts are attacked more frequently. Attackers may make numerous requests to a specific business account API over a certain period to log on to accounts or register a large number of fake accounts. WAF can protect APIs associated with accounts by automatically detecting APIs and providing account risk identification and scenario-based anti-crawling capabilities. For more information, see API security, Fraud detection, and Enable and configure the bot management module.

How do crawlers collect information by calling APIs? How do I mitigate the risks?

Crawlers automatically gather data from the Internet according to specific rules. Enterprises may lack effective management of online APIs, which allows attackers to gain unauthorized access to APIs. Improper configurations and illegal API access requests can also cause sensitive data leaks. WAF provides the bot management and API security modules.

  • The bot management module protects against and handles malicious requests based on intelligence data, such as the malicious crawler IP address database compiled in real time and dynamically updated IP address databases from major public clouds and data centers. For more information, see Enable and configure the bot management module.

  • The API security module automatically sorts through the APIs of services that are added to WAF, detects API vulnerabilities, traces API exception events, and provides suggestions on how to handle vulnerabilities. For more information, see API security.

How does WAF obtain and record the originating IP addresses of clients from custom header fields?

WAF obtains the originating IP addresses of clients in the following way: If a Layer 7 proxy is deployed in front of WAF, such as Anti-DDoS Proxy or Alibaba Cloud CDN, you can use custom header fields, such as X-Client-IP and X-Real-IP, to include the originating IP addresses of clients in request headers. This prevents attackers from forging the X-Forward-For header to bypass the detection of WAF and enhances business security. After you configure a custom header field in WAF, WAF uses the value of the header field as the originating IP address of a client. If you configure multiple custom header fields, WAF reads the originating IP addresses of clients from the header fields in sequence.

WAF records the originating IP addresses of clients in the following way: When you add a website to WAF, you can enable the traffic marking feature and use custom header fields to include the originating IP address of clients in request headers. This way, the backend server can obtain the originating IP addresses of clients from the custom header fields in back-to-origin requests for business analysis.

What are the main security risks of APIs and their possible impacts? How do I mitigate the risks?

Attackers may gain unauthorized access to APIs. Improper configurations and illegal API access requests can lead to sensitive data leaks. HTTP flood attacks can be launched by sending a large number of simulated normal requests to APIs. Expired APIs that have not been taken offline may lead to data leaks.

WAF provides the API security module for such issues. The API security module automatically detects high-risk issues such as sensitive data leaks and internal APIs exposed to the public network without the need for user configurations. Through comprehensive API monitoring and traffic visualization, WAF automatically discovers and classifies APIs, assesses the states of APIs, identifies expired APIs that are still exposed, and models normal access requests. By self-learning the API request parameter model, WAF enables near real-time alerts for abnormal API calls and mitigates risks by configuring appropriate defense strategies. For more information, see API security.

What risks might be associated with HTTP response code leaks? How do I mitigate the risks?

HTTP response codes are three-digit numeric codes indicating the HTTP response status from a web server. These error pages may contain information such as server code details, database connection information, SQL statements, or paths to sensitive files. Attackers can perform social engineering information gathering by triggering web application errors to obtain sensitive information leaked through error messages, such as middleware version information or database connection details. They can then carry out targeted attacks on specific versions with known vulnerabilities.

To prevent the leakage of server version information, we recommend that you hide unnecessary information in the HTTP response headers and return default error response pages. WAF can intercept specified HTTP status codes. For specific HTTP request status codes, you can configure rules to intercept the requests or generate alerts. This can prevent the leakage of sensitive server information. For example, you can configure a protection rule to intercept HTTP 404 status codes. After the rule takes effect, WAF intercepts requests for non-existent pages and returns a custom error page. For more information, see Configure custom response rules to configure custom block pages.

What business security risks exist in the gaming business? How do I mitigate the risks?

The gaming business faces several business security risks such as cheats, gold farming, account theft, and inappropriate content, which can harm both the player experience and the interests of game service providers. To address these challenges, the game risk control solution of Alibaba Cloud leverages accumulated risk control capabilities and combines data characteristics, intelligent algorithms, and graph computing to accurately identify illegal activities. In business scenarios where high user authenticity is required, we recommend that you use real-name verification to prevent users from bypassing identity verification mechanisms. To ensure the security of game content, the Content Moderation public cloud API of Alibaba Cloud performs security checks on images, audio, and texts to detect potential issues such as pornography, political sensitivity, and terrorism. In addition, WAF blocks malicious crawler requests based on the global traffic and threat intelligence of Alibaba Cloud to ensure the continuity of your gaming business.

What risks might arise when I provide web API services by using a domain name? How do I mitigate the risks?

Web applications use web APIs to implement features such as storage services, messaging services, and computing services. However, forged API requests can lead to illegal API access requests, such as inconsistency in request paths and parameter values exceeding limits, which can result in sensitive data leaks. The API security module of WAF ensures that only API requests that meet custom API rule files are executed. In addition, WAF blocks malicious crawler requests based on the global traffic and threat intelligence of Alibaba Cloud, such as large numbers of crawlers simulating normal API requests. These crawler requests may lead to business fraud and HTTP flood attacks. For more information, see API security, Enable and configure the bot management module, and Configure HTTP flood protection rules to defend against HTTP flood attacks.

What measures does WAF take to reduce the risk of data leaks?

WAF reduces data leak risks by taking the following measures: proactively identifying risky APIs, automatically responding to data leaks, employing a layered anti-intrusion strategy, intercepting crawlers, and detecting and mitigating attacks to ensure enterprise data security.

What are the main protection engines provided by WAF?

WAF provides two protection engines: a basic protection rules engine and a custom rules engine. These engines identify malicious characteristics in the business traffic of websites and apps and defend against this malicious traffic. For more information, see Basic protection rules and rule groups and Configure custom rules.

How does WAF intelligently detect and handle normal requests incorrectly identified as web attacks?

Due to the close resemblance between normal business request features and attack detection rules, WAF might identify normal business requests as attacks. To control and reduce the false positive rate, the WAF protection rules engine enables the intelligent rule hosting feature by default. The intelligent rule hosting feature dynamically manages the web intrusion prevention whitelist to minimize the risk of false positives. After the risk of false positives is eliminated, the protection rules engine automatically deletes the rules that were added to the whitelist. For more information, see Configure whitelist rules to allow specific requests.

How does WAF enhance database security defenses?

WAF enhances database security by using web intrusion prevention, HTTP flood protection, and crawler defense to improve overall security levels. For more information, see Basic protection rules and rule groups, Enable and configure the bot management module, and Configure HTTP flood protection rules to defend against HTTP flood attacks.

If a domain name hosted on a SLB instance is added to WAF, how can I prevent the requests that are destined for the domain name from bypassing WAF?

Domain names can be added to WAF in CNAME record mode or transparent proxy mode. After you add a domain name to WAF in CNAME record mode, we recommend that you configure an access control policy for the origin server to allow only inbound traffic from WAF back-to-origin CIDR blocks. This prevents attackers from bypassing WAF to attack the origin server. If the origin server is deployed on an SLB instance, you also need to configure an access control policy for the SLB instance to allow only inbound traffic from WAF back-to-origin CIDR blocks. After you configure an access control policy for the SLB instance, check whether the service port of the origin server can be accessed. If the service port cannot be directly accessed but the website services are still accessible, it indicates that the protection settings for the origin server are successful. Before you configure protection settings for the origin server, make sure that all domain names hosted on the SLB instance have been added to WAF. If you increase the number of WAF clusters and add new back-to-origin CIDR blocks, update the corresponding access control policy that you configured for the SLB instance. If the origin server is deployed on an SLB instance, you can also add your domain name to WAF in transparent proxy mode. The transparent proxy mode eliminates the need to modify DNS records and configure protection settings for the origin server.