Configuration Guidance
How WAF Engine Works
The built-in protection rules of WAF help you defend against common web application attacks, including XSS attacks, SQL injection, crawlers, and web shells. In addition, you can flexibly configure protection rules based on your website protection requirements. WAF better protects your website services based on the configured protection rules. Figure 1 shows the detection process for the WAF engine built-in protection rules. Figure 2 shows the detection sequence of user-defined rules.
- Pass: The current request is unconditionally permitted after a protection rule is matched.
- Block: The current request is blocked after a rule is matched.
- CAPTCHA: The system will perform man-machine verification after a rule is matched.
- Redirect: The system will notify the client to perform the redirection action after a rule is matched.
- Log: Only attack information is recorded after a rule is matched.
- Mask: The system will anonymize sensitive information after a rule is matched.
Protection Rule Configuration Methods
WAF provides the following customized configuration methods to simplify the configuration process. Select a proper configuration method based on your service requirements.
Method 1: Configuring protection rules for a single domain name
After a domain name is added to WAF, WAF automatically associates a protection policy with the domain name, and a protection rule configured for the domain name is also added to the protection policy associated with the domain name by default. If there are domain names applicable to the protection policy, you can directly add protection domain names by using the policy. For details, see Applying a Policy to Your Website.
- Entrance Figure 3 Access to the protection policy configuration page
- In the Policy column of the row containing the domain name, click Configure Policy.
- Protection rules that can be configured on the rule configuration page
Table 1 Protection rules that can be configured Protection Rule
Description
Reference Document
Basic web protection rules
With an extensive reputation database, WAF defends against Open Web Application Security Project (OWASP) top 10 threats, and detects and blocks threats, such as malicious scanners, IP addresses, and web shells.
CC attack protection rules
CC attack protection rules can be customized to restrict access to a specific URL on your website based on a unique IP address, cookie, or Referer field, mitigating CC attacks.
Precise protection rules
With these rules, WAF allows you to customize combinations of HTTP headers, cookies, URLs, request parameters, and client IP addresses, improving protection accuracy.
Blacklist or whitelist rules
Configure blacklist and whitelist rules to block, log only, or allow access requests from specified IP addresses.
Geolocation access control rules
These rules allow you to customize access control for IP addresses based on geographical locations that the requests originate from.
Web tamper protection rules
You can configure these rules to prevent a static web page from being tampered with.
Website anti-crawler protection rules
This function dynamically analyzes website service models and accurately identifies crawler behavior based on data risk control and bot identification systems, such as JS Challenge.
Information leakage prevention rules
You can add two types of information leakage prevention rules.
- Sensitive information filtering: prevents disclosure of sensitive information (such as ID numbers, phone numbers, and email addresses).
- Response code block: blocks the specified HTTP response codes.
False alarm masking rules
These rules help ignore certain attack detection rules for specific requests.
Data masking rules
Data masking prevents such data as passwords from being displayed in event logs.
Method 2: Configuring protection rules for multiple domain names at a time
- How to access Figure 4 Access to the Policies page
- Procedure
- Add a policy. For details, see Adding a Policy.
- Configure protection rules. For details, see Adding Rules to One or More Policies.
- Add protected domain names for the policy in batches. For details, see Applying a Policy to Your Website.
Last Article: Rule Configuration
Next Article: Configuring Basic Web Protection Rules


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.