This topic describes how to configure a blacklist and whitelist. The blacklist blocks requests from specified source IP addresses to access an Anti-DDoS Pro or Anti-DDoS Premium instance, and the whitelist allows the requests. You can add IP addresses to or remove them from a blacklist or whitelist as required. IP addresses that are marked as malicious addresses by intelligent protection algorithms are added to a blacklist. You can export the blacklist and whitelist to your local computer.

Prerequisites

An Anti-DDoS Pro or Anti-DDoS Premium instance is purchased. For more information, see Purchase Anti-DDoS Pro and Anti-DDoS Premium instances.

Background information

The blacklist and whitelist configuration takes effect only for individual instances.

  • Requests from IP addresses in a blacklist are blocked by the Anti-DDoS Pro or Anti-DDoS Premium instance. IP addresses in a blacklist are blocked for a specified period of time. An IP address is automatically removed from the blacklist after its blocking period expires.
    • Intelligent protection algorithms automatically calculate the blocking period of malicious IP addresses. The blocking period ranges from 5 minutes to 1 hour. If a malicious IP address is continuously used to attack your assets, the system automatically extends its blocking period.
    • When you add an IP address to a blacklist, you can specify a blocking period that ranges from 5 minutes to 7 days.
  • Requests from IP addresses in a whitelist are allowed by an Anti-DDoS Pro or Anti-DDoS Premium instance. IP addresses in a whitelist take effect until you manually remove them.

If an IP address is added to both the whitelist and blacklist, the whitelist takes effect in a higher priority. An IP address already added to the whitelist cannot be added to the blacklist.

Procedure

  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select Outside Mainland China or Mainland China.
    You can switch the region to manage and configure Anti-DDoS Pro or Anti-DDoS Premium instances. Make sure that you select the required region.
  3. In the left-side navigation pane, choose Mitigation Settings > General Policies.
  4. On the Protection for Infrastructure tab, select the target instance from the list on the left.
    You can search for instances by instance ID or description.
  5. In the Blacklist and Whitelist (Instance IP) section, click Change Settings.Blacklist and Whitelist (Instance IP)
  6. In the Blacklist and Whitelist Settings pane, click Blacklist or Whitelist to manage a blacklist or whitelist.Blacklist and Whitelist Settings
    • For more information about blacklist management, see Step 7.
    • For more information about whitelist management, see Step 8.
  7. Optional:Manage a blacklist.
    • Add an IP address to the blacklist.
      1. Click Manually Add.

        You can add up to 2,000 IP addresses to the blacklist. Separate multiple IP addresses with spaces or enter one IP address in each line.

      2. In the Blacklist Setting dialog box, enter the IP address and set the Blocking Time.Blocking period

        You can select or specify a Blocking Time ranging from 5 minutes to 7 days.

      3. Click Add.

      After the IP address is added to the blacklist, requests from this IP address are blocked during the Blocking Time. After the Blocking Time of the IP address expires, this IP address is not blocked.

    • Search for IP addresses in the blacklist: Enter a keyword in the search box to search for IP addresses that contain the keyword.
    • Clear the blacklist: Click Clear Blacklist to remove all IP addresses from the blacklist. You can also click Delete next to an IP address to remove it from the blacklist.
    • Download the blacklist.
      1. Click Download to start a download task.
      2. In the message that appears, click OK.Start the download task
      3. Close the Blacklist and Whitelist Settings pane.
      4. In the upper-right corner of the page, click the Task icon icon to expand the task list.
      5. Find the download task. After Status of the task becomes Exported, click Download in the Actions column.Download task in the list

      After you download the blacklist, you can open the downloaded TXT file and view details about the blacklist.

  8. Optional:Manage a whitelist.
    • Add an IP address to the whitelist.
      1. Click Manually Add.
      2. In the Whitelist Setting dialog box, enter the IP address to be allowed to the whitelist.
        Note You can add up to 2,000 IP addresses to the whitelist. Separate multiple IP addresses with spaces or enter one IP address in each line.
        Whitelist Setting
      3. Click Add.

      After the IP address is added to the whitelist, requests from this IP address are directly forwarded to the origin server. IP addresses in a whitelist take effect until you manually remove them.

    • Search for IP addresses in the whitelist: Enter a keyword in the search box to search for IP addresses that contain the keyword.
    • Clear the whitelist: Click Clear Whitelist to remove all IP addresses from the whitelist. You can also click Delete next to an IP address to remove it from the whitelist.
    • Download the whitelist.
      1. Click Download to start a download task.
      2. In the message that appears, click OK.Start the download task
      3. Close the Blacklist and Whitelist Settings pane.
      4. In the upper-right corner of the page, click the Task icon icon to expand the task list.
      5. Find the download task. After Status of the task becomes Exported, click Download in the Actions column.Download task in the list

      After you download the whitelist, you can open the downloaded TXT file and view details about the whitelist.