All Products
Search
Document Center

Web Application Firewall:Configure scan protection

Last Updated:Mar 31, 2026

Scan protection automatically blocks access requests from IP addresses associated with automated threats — including high-frequency web attackers, directory traversal sources, common security scanners, and IPs listed in the Alibaba Cloud malicious IP library.

Prerequisites

Before you begin, ensure that you have:

  • A WAF instance running the Pro edition or higher

  • A website already added to WAF. For more information, see Tutorial

Important

The Pro edition supports only the default scan protection policies. To configure custom rules for Blocking IPs Initiating High-frequency Web Attacks or Directory Traversal Prevention, upgrade to the Business edition or higher.

Scan protection policies

Scan protection includes four policies. Each can be enabled or disabled independently.

PolicyWhat it blocksCustomizableEdition required
Blocking IPs Initiating High-frequency Web AttacksClient IPs that launch multiple web attacks within a configurable time windowYesBusiness or higher
Directory Traversal PreventionClient IPs that send a high volume of requests probing many directories, with a high 404 response rateYesBusiness or higher
Scanning Tool BlockingRequests matching behavioral fingerprints of common scanners: sqlmap, AWVS, Nessus, AppScan, WebInspect, Netsparker, Nikto, and RSASNoPro or higher
Collaborative DefenseIPs listed in the Alibaba Cloud malicious IP libraryNoPro or higher

Configure scan protection

  1. Log on to the WAF console.

  2. In the top navigation bar, select the resource group and the region where your WAF instance is deployed. Select Chinese Mainland or Outside Chinese Mainland.

  3. In the left-side navigation pane, choose Protection Configurations > Website Protection.

  4. At the top of the Website Protection page, select the domain name from the Switch Domain Name drop-down list.切换域名

  5. On the Access Control/Throttling tab, locate the Scan Protection section.扫描防护

    When any scan protection policy is enabled, all requests to your website pass through that policy's check. To exempt requests that match specific conditions, configure a whitelist for Access Control/Throttling. For more information, see Configure a whitelist for Access Control/Throttling.
  6. Enable and configure each policy as needed.

Blocking IPs initiating high-frequency web attacks

This policy monitors web attacks from each client IP within a rolling time window. When the attack count from a single IP exceeds the configured threshold, WAF blocks that IP for the specified duration.

  1. Turn on Blocking IPs Initiating High-frequency Web Attacks.

  2. Click Settings.

  3. In the Rule Setting dialog box, configure the following parameters:规则设置 To start with a sensible baseline, select a built-in mode from the Mode section: Adjust individual parameters after selecting a mode if needed.

    ParameterDescription
    Inspection Time RangeThe rolling time window during which WAF counts web attacks from each client IP. A longer window catches sustained, lower-rate attack campaigns.
    The number of attacks exceedsThe attack count threshold per IP within the inspection time range. When a single IP exceeds this count, WAF triggers blocking. Set this lower to catch more aggressive attackers; set it higher to reduce false positives from noisy-but-legitimate traffic.
    Blocked IP AddressesHow long the IP remains blocked after the threshold is exceeded. Longer durations give more protection but delay recovery for legitimate IPs that were mistakenly flagged.
    ModeWhen to use
    Normal ModeRecommended for most production environments with typical attack volumes
    Strict ModeUse during periods of elevated or active attack activity — lowers thresholds to block more aggressively
    Flexible ModeUse when your environment has aggressive-but-legitimate crawlers or high-volume automated clients that trigger false positives
  4. Click Confirm.

To unblock an IP blocked by this policy, click Unblock IP Address.

Directory traversal prevention

This policy blocks a client IP when it sends a high volume of requests across many different directories, with a high proportion returning HTTP 404 — a pattern typical of automated directory scanning. All three conditions must be met simultaneously to trigger blocking.

  1. Turn on Directory Traversal Prevention.

  2. Click Settings.

  3. In the Rule Setting dialog box, configure the following parameters:规则设置 Select a built-in mode from the Mode section as a starting point:

    ParameterDescription
    Inspection Time RangeThe time window during which WAF evaluates the client IP's request pattern.
    The total requests exceedThe minimum total request count from a single IP within the inspection time range. This filters out low-volume clients who happen to hit a few missing paths.
    And the percentage of responses with 404 exceedsThe proportion of those requests that must return HTTP 404. Legitimate users occasionally hit missing pages; a high 404 rate indicates systematic probing.
    Directory numberThe number of distinct directories the IP must have probed. A high directory count distinguishes systematic traversal from repeated hits on a single missing path.
    Blocked IP AddressesHow long the IP remains blocked after all thresholds are met.
    ModeWhen to use
    Normal ModeRecommended for most production environments
    Strict ModeUse when the site is under active directory traversal attacks — tightens all thresholds
    Flexible ModeUse for sites that have many legitimate 404 responses by design, such as REST APIs with dynamic resource paths
  4. Click Confirm.

To unblock an IP blocked by this policy, click Unblock IP Address.

Scanning tool blocking

WAF identifies requests by matching them against behavioral fingerprints of known scanners. When a request matches a scanner's fingerprint, WAF always blocks it.

Turn on Scanning Tool Blocking to enable this detection. Turn it off to stop blocking scanner-originated requests.

No additional configuration is required.

Collaborative defense

WAF blocks all access requests from IPs in the Alibaba Cloud malicious IP library. When a request originates from an IP in this library, WAF blocks it.

Turn on Collaborative Defense to enable this blocking. Turn it off to stop blocking IPs from the malicious IP library.

No additional configuration is required.

Next steps