The blacklist by region feature identifies the source region of a client request based on the geographic location of the client's IP address. This lets you block or allow access from specific regions to mitigate frequent malicious requests from certain areas. This topic describes how to configure a region blacklist or whitelist.
Enable the blacklist
Log on to the DCDN console.
In the left navigation pane, click Domain Names.
On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.
In the navigation pane on the left of the domain name, click Security Settings.
On the Region Blacklist tab, click Modify.
In the Blocking Settings dialog box, select Rule Condition, Blocking Type, Rule Condition, and Regions.

Parameter
Description
Rule Condition
Rule conditions identify various parameters in a user request to determine whether a configuration applies to the request.
Do not use: Do not use rule conditions.
To add or edit rule conditions, manage them in the Rules Engine.
Blocking Type
Blacklist
Requests from regions in the blacklist cannot access any resources for the accelerated domain name.
Whitelist
Only requests from regions in the whitelist can access resources for the accelerated domain name. Requests from all other regions are blocked.
The blacklist and whitelist are mutually exclusive. Only one can be active at a time.
Regions
Specify the regions for the blacklist or whitelist.
Click OK.
Canceling a region blacklist
To delete a location blacklist, click Clear. After the location is deleted, DCDN will no longer block requests from the specified regions.

Configuration example
Block requests from Andorra that use the HTTP protocol to access the /image path.
In the rules engine, configure a rule to match requests for resources in the /image path that use the HTTP protocol.

On the region-based blocking tab, configure a blocking rule to block requests from Andorra that match the condition.
Rule Condition: Select the rule that you created in Step 1.
Blocking Type: Select Blacklist.
Region Settings: Select Andorra.

Result: If a request matches the rule, a
403 Forbiddenerror is returned with the messagedenied by region block.