Cookie-based CC Attack Protection
In some cases, it may be difficult to obtain source IP addresses of visitors for a website. For example, websites use proxies that do not use the X-Forwarded-For HTTP header field. Configuring the cookie field to identify visitors is recommended.
Attack Examples
Attackers may control several hosts and disguise as normal visitors to continuously send HTTP POST requests to website www.hwexample.com through the same IP address or many different IP addresses. As a result, the website may respond slowly or even fails to respond to normal requests as the attackers exhausted website resources like connections and bandwidth.
Protective Measures
- Based on the access statistics, check whether a large number of requests are sent from a specific IP address. If yes, it is likely that the website is hit by CC attacks.
- Log in to the management console and route website traffic to WAF. For details, see Connecting a Domain Name to WAF.
- Locate the row containing the domain name (website) you want to apply the policy to. In the Policy column, click Configure Policy. On the displayed page, in the CC Attack Protection area, verify that CC attack protection is enabled. Clicking
can change the status. Figure 1 shows an example. - Add a CC attack protection rule. Set Rate Limit Mode to Per user and enter the user identifier, which is the variable in the cookie field. To identify visitors more effectively, use sessionid or token. Figure 2 shows an example configuration.
With a CC attack protection rule, you can configure Protective Action to Block and specify a block duration. Then, once an attack is blocked, the attacker will be blocked until the block duration expires. These settings are recommended if your applications have high security requirements.
- Path: Part of the URL without the domain name
- Prefix match: The path ending with * indicates that the path is used as a prefix. For example, if the path to be protected is /admin/test.php or /adminabc, set Path to /admin*.
- Exact match: The path to be entered must match the path to be protected. For example, if the path to be protected is /admin, set Path to /admin.
- The path supports prefix and exact matches only and does not support regular expressions.
- The path cannot contain two or more consecutive slashes. For example, ///admin. If you enter ///admin, the WAF engine converts /// to /.
- Rate Limit Mode: Select Per user to distinguish a single web visitor based on the cookie.
- User Identifier: To identify visitors more effectively, use sessionid or token.
- Rate Limit: Number of requests allowed from a web visitor in the rate limiting period. The visitor's access request is denied if the limit is reached.
- Protective Action: Select Block. Then specify Block Duration. Once an attack is blocked, the attacker will be blocked until the block duration expires. These settings are recommended if your applications have high security requirements.
- Verification code: A verification code is required if your website visitor's requests reaches Rate Limit you configured. WAF allows requests that trigger the rule as long as the website visitors complete the required verification.
- Block: Requests are blocked if the number of requests exceeds the configured rate limit.
- Log only: Requests are logged only but not blocked if the number of requests exceeds the configured rate limit.
- Block Page: Select Default settings or Custom.
- Path: Part of the URL without the domain name
Last Article: IP Address-based Rate Limiting
Next Article: Configuring Anti-Crawler Rules to Prevent Crawler Attacks


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