IP address blacklist policies block requests from specific IPv4 addresses, IPv6 addresses, or CIDR blocks that you specify.
Prerequisites
Web Application Firewall (WAF) is enabled. Getting started with WAF (new edition).
Your domain is added to WAF for protection. Add a domain name for protection.
Create an IP address blacklist-based protection policy
-
Log on to the DCDN console.
In the left-side navigation pane, choose .
On the Protection Policies page, click Create Policy.
On the Create Policy page, configure the following parameters.
Section
Parameter
Description
Policy Information
Policy Type
Select IP Blacklist.
Policy Name
The policy name. Up to 64 characters: letters, digits, and underscores (_).
Make Default
Whether to set this policy as the default for its type.
NoteOnly one default policy is allowed per type. Once set, the default designation cannot be changed.
This switch is unavailable if a default policy already exists for this type.
Rule Information
Rule
The blacklist rule configuration. For more information, see Parameters of an IP address blacklist rule.
NoteTo increase the quota for the number of rules, submit a ticket.
Protected Domain Names
Select Association Mode
A domain name can have multiple policies of the same type. If a domain name already has a same-type policy, you can add this policy or replace the existing one. Replacement is available only for domain names using the default policy. Valid values:
Add and replace original policy: Unbind the existing policy and replace it with the current one.
Add and retain original policy: Both policies coexist without affecting each other.
Protected Domain Names
Domain names to associate with this policy.
Click Create Policy.
The policy is enabled by default.
Parameters of an IP address blacklist rule
You can add a rule when creating a blacklist or add one to an existing blacklist. The following table describes the rule parameters.
Parameter | Description |
Rule Name | The rule name. Up to 64 characters: letters, digits, and underscores (_). |
IP Address Blacklist | Enter IP addresses to block. Requests from these addresses match the rule. Supported formats:
|
Action | The action WAF performs when a request matches this rule. Valid values:
Use Monitor mode to evaluate rule performance and verify that legitimate requests are not blocked before switching to Block. |
Related APIs
CreateDcdnWafPolicy — Creates a custom protection policy.
BatchCreateDcdnWafRules — Creates multiple custom rules in a batch.
DescribeDcdnWafPolicies — Queries custom protection policies.
DescribeDcdnWafDefaultRules — Queries the default rule set.
DescribeDcdnWafPolicies — Queries custom protection policies.
DescribeDcdnWafPolicyValidDomains — Queries the valid domains for a custom protection policy.