CC protection can safeguard the access to websites. CC protection settings 2.0 are upgraded with emergency CC protection and custom CC rules. Emergency CC protection can perform big data analysis on websites' access history and their real servers' exceptional responses such as timeout and response delay, to generate protection policies for emergencies, blocking frequent access requests in real time. Custom CC rules support customizing protection based on user source IPs or session frequency, with actions including blocking, precise blocking, JS validation, observing, CAPTCHA, or precise CAPTCHA.
• Emergency CC protection and custom CC rules cannot be enabled at the same time.
• SESSION must be set before using the session-based CC protection policy.
• Slow Attack Protection: When forwarding traffic, web application firewalls aggregate and clean slow requests, providing a certain level of slow attack protection capabilities.
Slow Attack Protection
Slowloris, RUDY, and other slow attacks are techniques that slow down server response times, typically by sending a large number of slow or incomplete requests to consume server resources, preventing normal users from accessing web applications.
- When forwarding traffic, web application firewalls aggregate and clean slow requests by default, providing slow attack protection capabilities and the ability to clean slow attacks similar to Slowloris.
- When a web application firewall cleans slow requests, HTTP protocol type requests will return a status code of 400, while TCP protocol type requests will return a TCP RST.
Directions
Log in to the Web Application Firewall console, and at the top of the left sidebar, switch the console to the instance location.
Example 1: Emergency CC protection settings
Emergency CC protection is disabled by default. Before enabling it, please make sure that the custom CC rule feature is disabled.
- Log in to the WAF console and select Protection Policies > Basic Security on the left sidebar.
- On the basic security page, select the target domain name in the top-left corner and click CC Protection.
- Click
in the emergency CC protection module and confirm the operation to configure emergency CC protection.
Configuration item description:
Status switch: After emergency CC protection is enabled, if a website is under massive CC attacks (with a website QPS of 1000 or above), the protection will be automatically triggered. If there are no specific protection paths, we recommend enabling emergency CC protection. As there may be some false alarms, you can click IP Query on the left sidebar to view the information of blocked IPs and handle them in time.
If there are specific protection paths, we recommend using custom CC rules.
Example 2: Access source IP-based CC protection settings
An IP-based CC protection policy can be directly configured without setting SESSION.
- Log in to the WAF console and select Protection Policies > Basic Security on the left sidebar.
- On the basic security page, select the target domain name in the top-left corner and click CC Protection.
- On the CC protection page, click Add rule, and the rule adding window will pop up.
- In the pop-up window, configure relevant parameters and click OK.
Field description:
- Rule name: Name of the CC protection rule. It can contain up to 50 characters.
- Recognition mode: Supports two modes: IP recognition (default) and SESSION recognition. To use SESSION recognition, set the SESSION position first.
- Condition: Specifies the match parameter, logical operator, and match content to control access frequency. The match parameter defaults to URL. For the same rule, you can set up to 10 conditions with the logical AND operator. Refer to Match Mode Field Description for more details.
- Frequency limiting method: You can choose between Penalty QPS and Traffic throttling and frequency limiting.
- Penalty QPS: Applies a custom-duration action to clients that trigger the frequency rule, and the action is executed for requests initiated within the set time period.
- Traffic throttling and frequency limiting: Strictly controls the number of requests from clients that trigger the frequency rule and limits the maximum number of requests per unit of time. Available only for instances that have purchased BOT Protection or API Security.
- Access frequency: Set based on actual business requirements. Recommended value: 3–10× normal access frequency.
- Example: If your website is accessed 20 times per minute per visitor, set 60–200 times per minute.
- Action: Defaults to "Block". You can change this field as needed.
| Action Type | Description |
|---|---|
| Observe | Requests that meet the matching conditions will be monitored and logged. |
| Block | Requests that meet the rate-limiting conditions will trigger the block action, preventing the IP or Session from accessing all pages of the website. |
| Precise block | Requests that meet the rate-limiting conditions will trigger the precision block action. Unlike regular blocking, precision block only intercepts requests within the effective scope. |
| CAPTCHA | Browser-based access only. Requests that meet the matching conditions will be challenged with a CAPTCHA. Failure triggers block; success allows access. |
| Precise CAPTCHA | Executes CAPTCHA challenge for IP/Session access. Failure triggers block; success allows access. |
| JS validation | Executes JavaScript validation and logs the result. |
- Penalty duration: 1 minute–1 week. Default: 10 minutes.
- Priority: Integer 1–100 (default: 50). Smaller value = higher priority.
- You can select a created rule to disable, edit, or delete it.
- Requests that match the rules will execute the corresponding protection actions as configured.
Example 3: CC Protection Settings Based on SESSION
CC protection based on SESSION access rate can effectively solve misinterceptions caused by users sharing IP exits in office networks, supermarkets, or public Wi-Fi scenarios.
- Log in to the WAF console, select Configuration Center > Basic Security in the left sidebar, and enter the basic security page.
- On the basic security page, select the domain requiring protection in the upper left corner, click CC Protection, and enter the CC protection page.
- Click New in the SESSION settings, and a pop-up for adding a new SESSION will appear.
- In the SESSION Popup Settings, select COOKIE as the test content, identified as
security, with a start position of 0 and an end position of 9. Click Next after completing the configuration.
Field Descriptions:
- Session name: Custom SESSION name, up to 32 characters.
- Session position: COOKIE, GET, HEADER, or POST. GET/POST refer to HTTP request content parameters.
- Match mode: String pattern matching or position match.
- Session ID: Value identifier.
- Start position: Starting position of the match.
- End position: Ending position of the match.
- Enter the SESSION test page, set content as
security = 0123456789.... WAF uses the 10-digit string following "security" as the SESSION identifier. SESSION information can be deleted and reconfigured. - Set a CC protection policy based on SESSION. The configuration process is consistent with Example 1. Select SESSION as the identification method and choose the application target as needed.
- Configuration complete. The CC protection policy based on SESSION takes effect.
Using SESSION-based CC protection mechanism: blocking information cannot be viewed in IP blocking status.
in the emergency CC protection module and confirm the operation to configure emergency CC protection.