Updated on 2025-08-20 GMT+08:00

Blocking Traffic From Specified Locations

CNAD allows you to configure a policy to block traffic from outside China. After the policy takes effect, access traffic from outside China will be discarded.

The conditions for a policy to take effect vary according to product editions. For details, see Table 1.

Table 1 Geo-blocking policy effective conditions

Edition

Geo-Blocking Policy Effective Condition

Unlimited Protection Basic Edition

The policy takes effect once it is enabled and an attack is detected.

Unlimited Protection Advanced Edition

The policy takes effect after being enabled.

CNAD 2.0

  • Dedicated EIPs: The policy takes effect after being enabled.
  • Common EIPs: The policy takes effect once it is enabled and an attack is detected.

Geo-Blocking

  1. Log in to the AAD console.
  2. In the navigation pane on the left, choose Cloud Native Anti-DDoS Advanced > Protection Policies. The Protection Policies page is displayed.
  3. Click Create Protection Policy.
  4. In the displayed dialog box, set the policy name, select an instance, and click OK.

    Figure 1 Creating a policy

  5. In the row containing the target policy, click Set Protection Policy in the Operation column.
  6. In the Geo-Blocking configuration area, click Set.

    Figure 2 Geo-blocking settings

  7. Set the blocking rule as required.

    Figure 3 Select blocked locations
    Table 2 Rule description

    Parameter

    Description

    One-click blocking

    Currently, you can block traffic from Outside the Chinese mainland or Hong Kong, Macao, and Taiwan.

    • If you select Outside the Chinese mainland, only traffic from the Chinese mainland is allowed.
    • If you select Hong Kong, Macao, and Taiwan: Traffic from Hong Kong (China), Macao (China), and Taiwan (China) is blocked. Traffic from other regions is allowed.
    • If you select both Outside the Chinese mainland and Hong Kong, Macao, and Taiwan, only traffic from the Chinese mainland is allowed.

    Custom blocking rules

    Select the regions to be blocked based on the site requirements. A maximum of 20 regions can be blocked.

    You can select either One-click blocking or Custom blocking rules.

  8. Click OK. The geo-blocking setting is complete.