ASV Scanning Behind Cloudflare: A Complete Setup Guide

Published on

Updated on

Cloudflare’s protective layers; WAF, DDoS mitigation, rate limiting; are powerful security tools. They are also exactly the kind of active protection system that PCI DSS Section 5.6 says must not interfere with your quarterly ASV scans.

Here is how to resolve that tension without compromising either compliance or security. PCI DSS 4.0.1ASV ScanningCloudflare WAFQuarterly Compliance

What the PCI DSS standard actually says

PCI DSS Section 5.6 (ASV Scan Interference) is unambiguous: every ASV scan must be validated to confirm it has not been blocked or filtered by an active protection system.

If blocking is detected, the ASV must resolve the scan as inconclusive per Section 7.6; which is a compliance failure, not a workaround.

Critical requirement

If scan interference is recorded in the report, the scan automatically fails. A failed scan cannot be disputed after the fact simply by claiming no active blocking was in place; it must be prevented before the scan runs.

The standard distinguishes two types of protective systems:

  • Active protection systems
    Dynamically change their behaviour based on traffic patterns. Blocking an entire IP range because one request looked suspicious. Triggering a rate limit because a login page received more than three requests per second. These must not interfere with ASV scanning.
  • Static protection systems
    Apply consistent, rule-based responses regardless of source behaviour. A WAF that always blocks SQL injection payloads but always passes clean traffic from the same IP. These are compliant; they do not cause scan interference.

Why Cloudflare is a problem for ASV scanners

Cloudflare sits between the internet and your origin server as a reverse proxy. This creates two distinct problems for ASV scanning.

Problem 1 — the proxy intercepts the scan

When your ASV scans a domain that resolves to Cloudflare’s edge network, it is scanning Cloudflare — not your actual server. Vulnerabilities on your origin infrastructure will not be found. PCI DSS is explicit that the scan must cover all externally accessible systems within the cardholder data environment (CDE), so scanning only the proxy does not satisfy the requirement.

Important distinction

Scanning yourdomain.com (which resolves to Cloudflare IPs) is not the same as scanning your web server. Your ASV report must cover the origin server, not the proxy in front of it.

Problem 2 — Cloudflare’s active defences trigger interference

Cloudflare operates several protection mechanisms that fall squarely into the “active protection system” category described in PCI DSS Section 5.6:

  • WAF managed rules that block traffic based on cumulative request patterns from an IP
  • Rate limiting rules that trigger on volume thresholds (e.g. more than 3 login attempts per second)
  • DDoS protection that classifies the scanner’s port-sweep behaviour as an attack and blocks the IP range
  • Bot management scores that assign a low trust score to automated scan traffic and challenge or block it

Even with ASV IP ranges whitelisted, Cloudflare’s autonomous DDoS detection can override explicit allow rules during the scanner’s validation phase — a known issue documented in the Cloudflare community forums.

This is not a configuration error; it is the system doing exactly what it was designed to do.

What counts as scan interference vs what does not

Interference classification reference

IPS/IDS that only alerts No interference — passive, does not modify traffic flow
WAF blocking SQL injection, allowing clean traffic from same IP No interference — static, consistent behaviour
Rate limiting that blocks IP after threshold Interference — dynamic behaviour change based on traffic pattern
DDoS protection blocking scanner IP range Interference — reactive, pattern-based IP block
Cloudflare WAF challenge page for scan traffic Interference — dynamically modifies response for scanning behaviour
Firewall always blocking specific closed ports No interference — static, rule-based, consistent
Cloudflare bot score challenge Interference — dynamic scoring model, modifies based on behaviour

Two valid scanning strategies

There are two approaches to achieving a clean, interference-free ASV scan when Cloudflare is in use. Which strategy you choose depends on your infrastructure and risk tolerance.

  1. Whitelist ASV IPs in Cloudflare

    Configure Cloudflare to bypass WAF, rate limiting, DDoS mitigation, and bot management for your ASV’s IP ranges. Scanning proceeds through Cloudflare but without interference. The scan assesses what Cloudflare exposes on the origin’s behalf.

  2. Scan the origin server directly

    Temporarily expose the origin server’s IP to the ASV scanner, bypassing Cloudflare entirely. Provides the most thorough scan but temporarily removes the proxy layer. Must be tightly controlled and time-limited.

Which approach is right for you?

Most organisations use Strategy A for convenience. However, if your CDE includes backend services not served through Cloudflare, those must be scanned directly regardless. Strategy B is technically more complete but introduces a temporary exposure window. Both require documentation for your QSA.

Cloudflare setup: step-by-step

The following steps apply to Strategy A — configuring Cloudflare to allow ASV scanner traffic through without interference. All steps are performed in the Cloudflare dashboard.
01

Obtain your ASV's IP ranges

Your ASV is required to provide the complete list of IP ranges from which their scanners operate. These are published by most major ASVs. Examples include Qualys, Trustwave, Rapid7, SecurityMetrics, and Nabu. Do not proceed until you have confirmed and documented the current IP list directly from your ASV; these ranges change periodically.

02

Add the IP ranges to Cloudflare's IP Access Rules

Dashboard → Security → Tools → IP Access Rules Action: Allow Value: [ASV IP range, e.g. 38.123.140.0/25] Zone: Apply to all websites in account (or specific zone)

This step grants baseline access. However, it is not sufficient on its own; Cloudflare's autonomous systems (WAF, DDoS, bot management) can still trigger over and above IP allow rules.

03

Create a WAF bypass rule (custom rule)

Dashboard → Security → WAF → Custom Rules → Create rule Field: IP Source Address Operator: is in Value: [ASV IP ranges] Action: Skip ☑ All remaining custom rules ☑ Super Bot Fight Mode (if enabled) ☑ WAF managed rules ☑ Rate limiting rules Save rule; place it as the first rule in priority order.

Priority matters

The skip rule must be evaluated before any blocking rule fires. If it sits below a rate-limiting rule in the execution order, the block fires first, and the skip is never reached.Drag the bypass rule to the top of your custom rules list.

04

Disable or adjust DDoS protection for ASV IPs

Dashboard → Security → DDoS → HTTP DDoS Attack Protection Add Override: Expression: ip.src in {ASV IP ranges} Sensitivity: Essentially Off Action: Allow

This step is critical and frequently missed. Even with a WAF skip rule in place, Cloudflare's DDoS autonomous system operates at a lower layer and can block scan traffic independently. Setting sensitivity to "Essentially Off" for the ASV IP range disables that dynamic response.

05

Disable caching for scanned endpoints

Dashboard → Caching → Cache Rules Match: Hostname is [your domain] Action: Bypass cache

Cloudflare caching can cause the scanner to receive stale, cached responses that do not reflect the actual state of your origin server. This creates false negatives; vulnerabilities present on the origin may not be detected if the scanner receives a cached, clean response instead.

06

Verify with Cloudflare's Firewall Event Log before the scan

Run a test request from your ASV's IP range before the formal scan window and check the Firewall Activity Log in the Cloudflare dashboard. If any events are logged as "Block" or "Challenge" for the ASV IP, the configuration is incomplete. Investigate and resolve before scheduling the formal scan.

Pre-scan validation

Cloudflare's Activity Log is your best diagnostic tool. Filter by the ASV IP range and confirm every request shows "Allow" action. A single "Block" or "Challenge" event means the scan will report interference.

What Cloudflare does and does not affect

Handling inconclusive scan results

If interference is detected despite configuration steps, PCI DSS Section 7.6 governs resolution. The ASV marks the scan inconclusive. The merchant must then either:

  1. Resolve the interference (reconfigure Cloudflare and rescan), or
  2. Submit a False Positive / Exception Request with a written assertion that no active protection system was present or blocking the scan, and that no risk to the CDE exists; reviewed per standard PCI workflow.
Do not rely on exception requests

Exception requests are time-consuming, require QSA involvement, and may not be accepted. Resolving the Cloudflare configuration properly before the scan window is the only reliable path to a clean quarterly result.

Pre-scan compliance checklist

This article is based on PCI DSS ASV Program Guide requirements (Section 5.6 and 7.6) and Cloudflare's published PCI scanning documentation at developers.cloudflare.com/fundamentals/security/pci-scans. Configurations shown reflect the Cloudflare dashboard as of 2025.

Always validate configuration steps against current Cloudflare documentation before your scan window, as interface paths change with product updates.

Frequently Asked Questions

Yes. Cloudflare's security features, such as the Web Application Firewall (WAF), rate limiting, DDoS protection, and Bot Management, can block or challenge ASV scan traffic. If these protections interfere with the scan, the result may be marked as inconclusive or failed under PCI DSS requirements.

Yes. Before running a PCI ASV scan, you should obtain your ASV provider's IP ranges and create allow or bypass rules in Cloudflare. This helps prevent WAF, rate limiting, and other security features from interfering with legitimate scan traffic.

Your PCI ASV scan must cover all internet-facing systems within the PCI DSS scope. If Cloudflare acts as a reverse proxy, scanning only the Cloudflare edge may not identify vulnerabilities on your origin server. Depending on your environment, your ASV or QSA may require the origin server to be scanned directly.

Yes, but the WAF should be configured so it does not block or challenge traffic from your ASV scanner. Most organizations create temporary bypass rules for the ASV IP ranges during the scan window and remove them afterward.

PCI DSS 4.0.1 (current as of 2026) maintains the quarterly external scan requirement for applicable merchants and service providers. Key changes relevant to ASV scanning include updated requirements around multi-factor authentication for CDE access (Requirement 8) and expanded scope definitions under the network security controls section (Requirement 1), which can increase the number of IPs that fall within scan scope. Review your CDE boundary before purchasing a pricing tier to avoid scope underestimation.

Before the scheduled scan, review Cloudflare's Firewall Events or Security Events log while sending test requests from your ASV's IP addresses. Every request should show an Allow action rather than Block or Challenge.
No. Cloudflare can be part of a PCI DSS-compliant environment when configured correctly. However, merchants remain responsible for ensuring Cloudflare does not interfere with required ASV scans and that all in-scope systems are properly scanned.
Review your Cloudflare security configuration, ensure ASV IP ranges are exempt from active protections, verify no blocking occurred in the Firewall Events log, and rerun the scan. Resolving scan interference before rescanning is typically faster than relying on exception requests.

Authored by

Binoy Koonammavu blog image

Binoy Koonammavu, is the Founder and CEO of Secusy ASV, where he helps SMBs and fintech companies meet PCI DSS scanning requirements without the complexity of enterprise-grade tools. His writing focuses on making ASV compliance straightforward for growing businesses.

Share:

Related Post