Skip to content

Custom Rules

Configuration Scenario

If you need to control access sources for business resources, Cloud Protection provides custom rule configuration. By configuring custom rules for client IPs, URLs, referers, client identifiers, etc., you can defend against high-frequency CC attacks and prevent malicious user scraping.

Configuration Guide

View Configuration

Log in to the Cloud Protection console, select [Domain Management] from the menu bar, click [Configure] next to the domain name to enter the domain configuration page. Under [Access Control], you can see the custom rules configuration, which is disabled by default:

img

Modify Configuration

  1. Modify Configuration

Click "Add Configuration" to enter the custom rules configuration page:

img

Custom Rules:

  • Multiple custom rules can be added.
  • Each custom rule can be individually enabled or disabled.
  • Multiple custom rules can be prioritized, with smaller numbers indicating higher priority.
  • Match content cannot be empty. If the content is empty, enter a space instead.

  • Enable Configuration

Step 1: Enable the added custom rule:

img

Step 2: Enable the master switch for custom rules:

img

  1. Disable Configuration

Click the button next to the custom rule to disable the configuration:

img

Configuration Example 1:

Block proxy IP access:

img

Configuration method:

  1. Rule Name: Enter a custom rule name.
  2. Enable: Yes
  3. Rule Settings, Match Field: Proxy IP
  4. Match Mode: Not Equal
  5. Match Content: Enter a space (if empty)
  6. Action: Block
  7. Click OK

Configuration Example 2:

Block useragent containing "Baiduspider":

img

Configuration method:

  1. Rule Name: Enter a custom rule name.
  2. Enable: Yes
  3. Rule Settings, Match Field: Client UA
  4. Match Mode: Contains
  5. Match Content: Baiduspider
  6. Action: Block
  7. Click OK