You can customize a CC attack protection rule to restrict access to a specific URL on your website based on an IP address, cookie, or Referer, mitigating CC attacks. To make your custom CC attack protection rules take effect, ensure that you have enabled CC attack protection.
If you have enabled enterprise projects, ensure that you have all operation permissions for the project where your WAF instance locates. Then, you can select the project from the Enterprise Project drop-down list and configure protection policies for the domain names in the project.
A website has been added to WAF.
If a visitor whose cookie is name accesses a page on your website where the address includes /admin at the end (for example, https://www.example.com/adminlogic) more than 10 times within 60 seconds, WAF blocks the requests from visitors of the same cookie name for 600s and returns the page configured for Page Content. Figure 2 shows the configurations.
Parameter |
Description |
Example Value |
---|---|---|
Mode |
|
Standard |
Path |
Set this parameter only when Standard is selected for Mode. Part of the URL without the domain name.
NOTE:
|
/admin* |
Condition List |
Set this parameter only when Advanced is selected for Mode. Click Add to add conditions. At least one condition is required, but up to 30 conditions are allowed. If you add more than one condition, the rule will only take effect if all of the conditions are met.
|
Path Include /admin |
Rate Limit Mode |
|
Per user |
User Identifier |
This parameter is mandatory when you select Per user for Rate Limit Mode.
|
name |
Rate Limit |
The number of requests allowed from a website visitor in the rate limit period. If the number of requests exceeds the rate limit, WAF takes the action you configure for Protective Action. All WAF instances: Requests to on one or more WAF instances will be counted together according to the rate limit mode you select. By default, requests to each WAF instance are counted. If you enable this, WAF will count requests to all your WAF instances for triggering this rule. To enable user-based rate limiting, Per user or Other (Referer must be configured) instead of Per IP address must be selected for Rate Limit Mode. This is because IP address-based rate limiting cannot limit the access rate of a specific user. However, in user-based rate limiting, requests may be forwarded to one or more WAF instances. Therefore, All WAF instances must be enabled for triggering the rule precisely. |
10 requests allowed in 60 seconds |
Protective Action |
The action that WAF will take if the number of requests exceeds Rate Limit you configured. The options are as follows:
|
Block |
Allowable Frequency |
This parameter can be set if you select Block dynamically for Protective Action. WAF blocks requests that trigger the rule based on Rate Limit first. Then, in the following rate limit period, WAF blocks requests that trigger the rule based on Allowable Frequency you configure. Allowable Frequency cannot be larger than Rate Limit. NOTE:
If you set Allowable Frequency to 0, WAF blocks all requests that trigger the rule in the next rate limit period. |
8 requests allowed in 60 seconds |
Block Duration |
Period of time for which to block the item when you set Protective Action to Block. |
600 seconds |
Block Page |
The page displayed if the maximum number of requests has been reached. This parameter is configured only when Protective Action is set to Block.
|
Custom |
Block Page Type |
If you select Custom for Block Page, select a type of block page. The options are:
|
text/html |
Page Content |
If you select Custom for Block Page, configure the content to be returned. |
Page content styles corresponding to different page types are as follows:
|
Rule Description |
A description of the rule. This parameter is optional. |
None |
If you have configured a CC attack protection rule for your domain name, with Protective Action set to Block, as shown in Figure 2, to verify WAF is protecting your website (www.example.com) against the configured CC attack protection rule:
If you select Verification code for protective action, a verification code is required for visitors to continue the access if they exceed the configured rate limit.
If domain name www.example.com has been connected to WAF, perform the following steps to verify that WAF CAPTCHA verification is enabled.
If you access the page for 10 times within 60 seconds, a verification code is required when you attempt to access the page for the eleventh time. You need to enter the verification code to continue the access.