Configuring CC Attack Protection Rules to Defend Against CC Attacks
CC attack protection can limit the access to a protected website based on a single IP address. To use this protection, ensure that you have toggled on CC Attack Protection (its status should be ).
Prerequisites
A protected website has been added. For details, see Adding a Website to EdgeSec.
Constraints
- It takes several minutes for a new rule to take effect. After the rule takes effect, protection events triggered by the rule will be displayed on the Events page.
- A reference table can be added to a CC attack protection rule. The reference table takes effect for all protected domain names.
- A CC attack protection rule offers protective actions such as Verification code and Block for your choice. For example, you can configure a CC attack protection rule to block requests from a visit for 600 seconds if the visitor accessed a URL (for example, /admin*) of your website over 10 times within 60 seconds.
Procedure
- Log in to the management console.
- Click in the upper left corner of the page and choose .
- In the navigation pane on the left, choose Website Settings page is displayed. . The
- In the Policy column of the row containing the target domain name, click the number to go to the Policies page.
Figure 1 Website list
- In the CC Attack Protection configuration area, change Status as needed and click Customize Rule to go to the CC Attack Protection page.
Figure 2 CC Attack Protection configuration area
- In the upper left corner of the CC Attack Protection page, click Add Rule.
- In the displayed dialog box, configure a CC attack protection rule by referring to Table 1.
Table 1 Rule parameters Parameter
Description
Example Value
Rule Name
Name of the rule
test
Rule Description
A brief description of the rule. This parameter is optional.
--
Set Effective Time
- Immediate: The rule takes effect immediately.
- Time Segment: The rule takes effect after the set time segment.
- Periodically: The rule takes effect in the specified period of each day.
--
Priority
User-defined priority. The value ranges from 1 to 100.
--
Rate Limit Mode
Requests from a specific source are limited. For example, if traffic from an IP address (or user) exceeds the rate limit you configure in this rule, EdgeSec limits traffic rate of the IP address (or user) in the way you configure.
- Per IP address: A website visitor is identified by the IP address.
- Per user: A website visitor is identified by the cookie value.
--
User Identifier
Cookie field name, which is required when Rate Limit Mode is set to Per user.
--
Trigger
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.
- Fields: include geolocation, path, IP address, cookie, header, Params, and HTTP code.
- Subfield: Configure this field only when Cookie, Header, or Params is selected for Field.
NOTICE:
The length of a subfield cannot exceed 2,048 bytes. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- Logic: Select a logical relationship from the drop-down list.
NOTE:
If you set Logic to Include any value, Exclude any value, Equal to any value, Not equal to any value, Prefix is any value, Prefix is not any of them, Suffix is any value, or Suffix is not any of them, select an existing reference table. For details, see Creating a Reference Table to Configure Protection Metrics In Batches.
- Content: Enter or select the content that matches the condition.
Path Include /admin
Rate Limit
The maximum requests that a website visitor can initiate within the configured period. If the configured rate limit has been reached, EdgeSec will respond according to the protective action configured.
10 requests allowed in 60 seconds
Protective Action
The action that EdgeSec will take if the number of requests exceeds Rate Limit you configured. The options are as follows:
- Verification code: EdgeSec allows requests that trigger the rule as long as your website visitors complete the required verification. Currently, cerification code supports English.
- Block: EdgeSec blocks requests that trigger the rule.
- Log only: EdgeSec only logs requests that trigger the rule.
Block
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.
- If you select Default settings, the default block page is displayed.
- If you select Custom, a custom error message is displayed.
Custom
Block Page Type
If you select Custom for Block Page, select a type of the block page among options application/json, text/html, and text/xml.
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:
- text/html: <html><body>Forbidden</body></html>
- application/json: {"msg": "Forbidden"}
- text/xml: <?xml version="1.0" encoding="utf-8"?><error> <msg>Forbidden</msg></error>
Protection duration
User-defined protection duration. The value ranges from 1 to 65535.
--
- Click OK. You can then view the added CC attack protection rule in the CC rule list.
- To disable a rule, click Disable in the Operation column of the rule. The default Rule Status is Enabled.
- To modify a rule, click Modify in the row containing the rule.
- To delete a rule, click Delete in the row containing the rule.
Configuration Example - Verification Code
If domain name www.example.com has been connected to EdgeSec, perform the following steps to verify that EdgeSec CAPTCHA verification is enabled.
- Add a CC attack protection rule with Protection Action set to Verification code.
Figure 3 Verification code
- Enable CC attack protection.
Figure 4 CC Attack Protection configuration area
- Clear the browser cache and access http://www.example.com/admin/.
If you access the page 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.
There is a delay before the blocking takes effect. If the operation proceeds too quickly, the eleventh visiting attempt may not be blocked.
- Go to the EdgeSec console. In the navigation pane on the left, choose Events. View the event on the Events page.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot