Nice To E-Meet You!



    What marketing services do you need for your project?

    Cloudflare vs AWS WAF For Blocking VPNs, Bots And Countries

    Last updated: November 2026

    Quick answer: Pick Cloudflare if you want the fastest setup and strong bot features on lower plans: country and ASN rules work on every plan, Bot Fight Mode is free, Super Bot Fight Mode comes with Pro and Business, and Turnstile is a free CAPTCHA alternative. The dedicated VPN and anonymizer IP lists and the full 1 to 99 bot score need Enterprise. Pick AWS WAF if your application already runs on AWS (CloudFront, Application Load Balancer, API Gateway): its Anonymous IP list managed rule group flags VPNs, proxies, Tor and hosting providers on pay-as-you-go pricing, and Bot Control adds bot detection for a monthly fee plus per-request charges.

    Both are common first choices for blocking VPN traffic, bots and unwanted countries. If you are working through our guide on how to block VPN users on your website, this comparison helps you decide where those rules should live.

    At A Glance

    CloudflareAWS WAF
    Where it runsCloudflare’s global edge network, in front of any hostAttached to CloudFront, ALB, API Gateway, AppSync and other AWS resources
    Country blockingCustom rules on all plansGeo match statements (up to 50 countries per rule)
    ASN blockingCustom rules and ASN listsASN match statements
    VPN / anonymizer listsManaged lists (cf.vpn, cf.anonymizer) on top Enterprise tierAnonymous IP list managed rule group
    Bot protectionBot Fight Mode (Free), Super Bot Fight Mode (Pro, Business), Bot Management (Enterprise)Bot Control managed rule group (Common and Targeted levels)
    ChallengesManaged Challenge, JS challenge, TurnstileCAPTCHA and Challenge actions
    Pricing modelFlat plans (Free, Pro, Business), Enterprise by quotePay as you go: per web ACL, per rule, per million requests, plus add-ons

    How We Evaluated

    We compared the two on the tasks site owners most often need: blocking or challenging VPNs and anonymizers, stopping bots on login and signup, restricting countries, and keeping costs predictable. We used Cloudflare and AWS documentation and published pricing. Neither vendor paid for inclusion.

    Blocking VPNs And Anonymizers

    Cloudflare maintains managed IP lists including known VPN servers (cf.vpn), a broader anonymizer list covering VPNs, open proxies and Tor (cf.anonymizer), and open proxies, which you reference in custom WAF rules. The full set of managed lists is reserved for the top Enterprise tier. On lower plans you can still challenge hosting-provider ASNs, block Tor through country code T1 and combine this with bot rules.

    AWS WAF offers the Anonymous IP list as an AWS managed rule group. It identifies requests from Tor exit nodes, VPNs, public proxies and hosting or cloud providers, and you can block, challenge or simply label matches and act on them in later rules. It is available to any AWS WAF customer, which makes it the more accessible anonymizer list of the two for smaller teams already on AWS.

    Bot Protection

    Cloudflare scores requests with a bot score from 1 (automated) to 99 (human). Free plans get Bot Fight Mode, a simple on switch. Pro and Business get Super Bot Fight Mode, with separate actions for definitely automated and likely automated traffic and an allowlist for verified bots. Enterprise Bot Management exposes the full score, JA3 and JA4 fingerprints and advanced analytics for custom rules.

    AWS WAF Bot Control comes in a Common level (verifies self-identified bots, flags common automation) and a Targeted level for sophisticated bots on high-value paths, using browser interrogation and behavior. Targeted protection costs considerably more per request, so AWS recommends scoping it to pages like login and checkout. Pair it with AWS WAF Fraud Control for login and account creation protection.

    For a deeper look at bot defense options, see DataDome vs HUMAN vs Cloudflare Bot Management and how websites detect bots.

    Country Restrictions

    Both handle country rules well. Cloudflare’s rule builder matches on the visitor’s country on every plan. AWS WAF uses geo match statements, with a limit of 50 countries per rule. Our guide to geo-blocking explains when country rules make sense.

    Pricing

    Cloudflare is easy to forecast below Enterprise: flat monthly plans, with bot features scaling by plan. The catch is that the most powerful anonymizer lists and bot score granularity require an Enterprise contract priced by quote.

    AWS WAF charges per web ACL, per rule and per million requests inspected, with extra monthly and per-request fees for Bot Control, Fraud Control and some challenge actions. Small sites pay little; very high traffic or broad Targeted Bot Control coverage can add up quickly. Place cheap rules (allowlists, geo and IP rules) before expensive managed groups and use scope-down statements so only relevant requests reach Bot Control.

    Which Should You Choose?

    • Any host, quick setup, predictable bills: Cloudflare.
    • Already on CloudFront or ALB: AWS WAF, so rules sit next to your infrastructure.
    • Need a VPN and anonymizer list without an enterprise contract: AWS WAF’s Anonymous IP list, or pair Cloudflare with an IP intelligence API (see IPinfo vs MaxMind vs IPQualityScore).
    • Large enterprise with heavy bot pressure: Cloudflare Enterprise Bot Management, AWS WAF Targeted Bot Control, or a specialist bot vendor on top.

    Frequently Asked Questions

    Can Cloudflare block VPNs on the free plan?

    Not with a dedicated VPN list. The cf.vpn and cf.anonymizer managed lists are Enterprise features. Free and paid plans can still challenge hosting ASNs, block Tor and use Bot Fight Mode, which catches some VPN-based abuse.

    Does AWS WAF block VPN traffic?

    Yes. The Anonymous IP list managed rule group flags VPNs, public proxies, Tor exit nodes and hosting providers, and you choose whether to block, challenge or label those requests.

    Is AWS WAF or Cloudflare cheaper?

    For small and medium sites, Cloudflare’s flat plans are usually simpler and often cheaper. AWS WAF can be very cheap at low volume, but costs grow with requests, rules and add-ons like Bot Control. Model your own traffic before deciding.

    Can I use both?

    Yes. Some teams run Cloudflare at the edge and AWS WAF in front of their AWS origin, but this doubles rule management. Most pick one primary WAF.

      Once a week you will get the latest articles delivered right to your inbox