Cloudflare WAF: the free plan, rules and when it is not enough
Most Lithuanian companies put their website behind Cloudflare for speed and a free SSL certificate. The orange cloud in the DNS settings often creates the impression that the website is already “protected by a WAF”. That is partly true, but only partly.
This article reviews what Cloudflare WAF (web application firewall) gives you on the free plan, which five rules are worth creating on day one and when the free plan is no longer enough. The data was checked against Cloudflare documentation on 2026-10-18.
Short answer
- What you get for free: basic managed rules for critical vulnerabilities, 5 custom rules, 1 rate limiting rule and unmetered DDoS protection.
- What you do not get is a full WAF: the broad Cloudflare Managed Ruleset and OWASP Core Ruleset start from the Pro plan (USD 20 per month).
- Enterprise is for when accuracy matters: bot scoring, ML attack detection, flexible rate limiting and 24/7 support. The price is contract-based and you pay only for clean traffic.
- The biggest risk is not the plan but the configuration: if the server IP address is reachable directly, any WAF can be bypassed.
1. What does Cloudflare WAF give you for free?
Managed rules. On the free plan, the Cloudflare Free Managed Ruleset runs by default [1]. It is a small set of rules that Cloudflare extends when widely exploited critical vulnerabilities appear (for example, in 2026 rules were added for React / Next.js and WordPress vulnerabilities) [2]. The full Cloudflare Managed Ruleset and OWASP Core Ruleset (the equivalent of the ModSecurity CRS) are available only from the Pro plan [1].
Custom rules. On the free plan you can have 5. The rules can check the path, country, IP address, headers and known bots, but regular expressions cannot be used (regex is allowed from Business) [3].
Rate limiting. One rule, counted by IP address only, with a period and block duration of just 10 seconds [4]. It is suitable for protecting a login form or an API from brute force, but not from slow attacks.
DDoS protection. Unmetered DDoS protection at OSI layers 3-7 is available on all plans, including the free one [5]. This is the strongest part of the free plan: you will not be able to build protection at this scale on your own server.
Leaked password detection. The free plan includes the “Password Leaked” field: Cloudflare checks whether the password used to log in appears in known data breaches [6].
Bots. The free Bot Fight Mode stops simple bots from cloud providers and headless browsers [7]. Its limitations are covered in section 3.
| Free | Pro | Business | Enterprise | |
|---|---|---|---|---|
| Price [8] | USD 0 | USD 20/month (annual), USD 25 (monthly) | USD 200/month (annual), USD 250 (monthly) | Contract-based, by clean traffic [17] |
| Managed rules [1] | Free Managed Ruleset | + Cloudflare Managed, OWASP Core Ruleset | + Cloudflare Managed, OWASP Core Ruleset | + sensitive data detection |
| Custom rules [3] | 5, no regex | 20, no regex | 100, with regex | 1,000, with regex |
| Rate limiting [4] | 1 rule, 10 s, IP only | 2 rules, up to 1 min, IP only | 5 rules, up to 10 min | Up to 100 rules; with the add-on, by header, cookie, JA3/JA4 |
| Bots [7] | Bot Fight Mode | Super Bot Fight Mode | Super Bot Fight Mode + analytics | Bot Management: bot score, JA3/JA4 [18] |
| Attack score (ML) [9] | None | None | Class only (cf.waf.score.class) | Full score + SQLi, XSS, RCE scores |
| Security events [10] | Sampled only | All | All + export | All + export, 90-day analytics, Logpush to SIEM |
| POST body fields in custom rules [19] | None | None | None | Yes, up to 128 KB |
| DDoS protection [5] | Unmetered | Unmetered | Unmetered | Unmetered, attack traffic is not charged [17] |
2. Five rules worth creating on day one
Five custom rules is not many, so each one has to cover a real risk. Below are the rules we most often recommend for small and medium-sized websites. You will find them in the Cloudflare dashboard: Security → WAF → Custom rules → Create rule → Edit expression.
1. Admin area only from your IP
Action: Block (or Managed Challenge if your IP address changes). Example for a WordPress site; admin-ajax.php is left open because the public part of the site uses it:
(starts_with(http.request.uri.path, "/wp-admin")
or http.request.uri.path eq "/wp-login.php")
and http.request.uri.path ne "/wp-admin/admin-ajax.php"
and not ip.src in {203.0.113.10}
2. Sensitive files and unused endpoints
Action: Block. Requests for .git, .env or xmlrpc.php are among the most common findings of automated scanners that we see in DAST scans:
http.request.uri.path contains "/.git"
or http.request.uri.path contains "/.env"
or http.request.uri.path eq "/xmlrpc.php"
3. Challenge visitors from outside Lithuania
Action: Managed Challenge. This suits you if your customers are in Lithuania. Known bots (for example, Googlebot) are let through, so SEO does not suffer. We use this rule on this website too:
(ip.src.country ne "LT") and (not cf.client.bot)
4. Leaked passwords at login
Action: Managed Challenge. If someone logs in with a password from a known data breach, the visitor has to prove they are not a bot. This stops a large share of credential stuffing attacks [6]:
cf.waf.credential_check.password_leaked
5. Rate limiting for login or API
This is a separate “Rate limiting rules” rule, not part of the custom rules limit. On our website, all /api/ paths (forms, analytics) are limited to 10 requests per 10 seconds per IP:
When incoming requests match: starts_with(http.request.uri.path, "/api/")
Count by: IP
Limit: 10 requests per 10 seconds
Action: Block, 10 seconds
Keep your rules in code, not only in the dashboard. We manage our entire Cloudflare zone (DNS, WAF, rate limiting) with Terraform: changes are reviewed before deployment and can be rolled back in seconds if needed.
3. When is the free plan no longer enough?
You have a login, payments or personal data
The Free Managed Ruleset covers only widely exploited critical vulnerabilities. It will not stop generic SQL injection, XSS or file upload attacks against your application the way the Cloudflare Managed Ruleset and OWASP Core Ruleset (Pro plan) do [1]. If your website handles customer data, USD 20 per month is the lowest price for full managed rulesets.
You have an API or a mobile app
The free Bot Fight Mode cannot be switched off for individual paths: neither custom WAF rules with Skip nor Page Rules bypass it, and the documentation warns that it may block API and mobile app traffic [7]. If partner integrations or a mobile app have started returning errors, check this setting first. The Pro plan’s Super Bot Fight Mode works through the rules engine and supports exceptions [7].
You are being attacked slowly
Free rate limiting sees only a 10-second window [4]. A bot that tries to log in once every few seconds from many IP addresses will never reach this limit. Longer windows and counting by more than just IP are available on paid plans.
You need to investigate an incident
On the free plan, security events are shown only as a sample (sampled logs): not every blocked or allowed event is visible [10]. When you need to answer exactly what happened, which requests got through and since when, that may not be enough. This is especially relevant for NIS2 entities.
Your server IP address is directly reachable
The most common mistake we find: the website goes through Cloudflare, but the server accepts requests from any IP address. An attacker only needs to find the real IP (historical DNS records, email headers, subdomains not behind Cloudflare) and the WAF and DDoS protection no longer apply. Cloudflare recommends [11]:
- Cloudflare Tunnel: the server does not need a public IP address [12];
- Authenticated Origin Pulls: the server accepts only connections signed with a Cloudflare certificate [13];
- allowing only Cloudflare IP addresses in the server firewall. The documentation notes that this alone is not enough [14], so combine it with one of the approaches above.
It is easy to check: if this command returns the website content, the WAF can be bypassed.
curl -sk --resolve yourdomain.com:443:SERVER_IP https://yourdomain.com/ | head
4. When do you need the Enterprise plan?
The Pro and Business plans are bought on your own by card, while Enterprise is a contract-based plan (Cloudflare calls these “Externa” packages [17]). It is not just more rules: the accuracy of the protection itself changes.
What does Enterprise give you for security?
- Bot management by score. Bot Management assigns each request a score (1-99) and JA3/JA4 TLS fingerprints [18]. You can strictly block obvious bots on login or pricing pages while showing no challenges to genuine buyers. The free Bot Fight Mode does not have this level of accuracy.
- Machine learning attack detection. A full WAF attack score and separate SQLi, XSS and RCE scores [9]. They catch attack variations for which no rule signature exists yet.
- Flexible rate limiting. Up to 100 rules, and with the Advanced Rate Limiting add-on, traffic can be counted not only by IP but also by session cookie, header, ASN or JA3/JA4 [4]. This is exactly what stops distributed credential stuffing attacks from thousands of IP addresses, which the free plan cannot see.
- POST request body inspection. Only on the Enterprise plan can custom rules inspect the request body, for example to block a specific JSON field or parameter in an API request [19]. On Enterprise, managed rules inspect up to 128 KB of the body, while on Pro and Business the default limit is lower and can only be increased through Cloudflare support [1]. A longer body is truncated, so an attack hidden further from the start goes uninspected.
- 1,000 custom rules with regex [3] and all security events with 90-day analytics [10]. You can investigate an incident instead of guessing from a sample.
- Logpush to your SIEM. In the Cloudflare dashboard, security events are visible for up to 31 days and analytics for up to 90 days [10], and request headers and cookies appear in logs only once you configure them as custom fields [20]. Logpush continuously sends HTTP request and security event logs to your SIEM or storage, where you keep them for as long as you need. For regulated organisations this is essential: the DORA ICT risk management standards require logging access and network traffic events, setting your own retention period and protecting logs from modification or deletion [21]. You cannot meet these requirements with the Cloudflare dashboard alone.
- 24/7/365 support by email and an emergency phone line, with a 100% uptime guarantee [17].
How is the price calculated?
There is no public price: it is negotiated individually and differs greatly from the self-serve plans. Cloudflare states that on Externa packages you pay only for clean traffic: DDoS attack traffic is not charged, and there are no fees for individual WAF rules or access lists [17]. In our experience, the price is mostly driven by the volume of legitimate traffic and the number of domains.
What is clean traffic? A contract usually counts two traffic streams, which add up: CDN traffic (all legitimate traffic through Cloudflare) and traffic inspected by Bot Management. Traffic that Cloudflare blocked at the network edge is not included in either. That is why even a very large DDoS or bot attack does not increase your bill: you pay only for the clean traffic that reached your services. Before negotiating, it is worth building an accurate picture of your legitimate traffic and deciding which domains genuinely need Enterprise protection.
Who is Enterprise worth it for?
- E-commerce, finance and other services with a login, where bots scrape prices or test leaked passwords and every wrongly blocked customer costs sales.
- Organisations that need to be able to investigate incidents and keep logs in their own SIEM because of NIS2 or DORA.
- Applications with an API where attacks hide in the POST request body.
- Companies with many domains and applications that need a unified policy and 24/7 support.
An important point: Enterprise gives you the tools, but not the result. Bot score thresholds, rate limiting characteristics and ML score thresholds have to be calibrated to your traffic, otherwise you will either block customers or pay for features that only run in monitoring mode. Properly tuned Enterprise protection is far more effective than any self-serve plan.
Is your WAF really working?
A free DAST scan will show which vulnerabilities automated scanners can see. If we find any, we will help you configure Cloudflare or F5 WAF so that they are covered until developers fix them.
Book a consultation5. Cloudflare or your own WAF (ModSecurity, Coraza)?
The alternative to a cloud WAF is a firewall on your own server: ModSecurity (Apache, Nginx) or Coraza (a ModSecurity-compatible WAF written in Go, used with Caddy, Envoy and others) [15]. Both work with the same OWASP Core Rule Set ruleset [16].
- Your own WAF is suitable when data cannot travel through a foreign provider, when you need full logs and control over the rules, or when the application runs on an internal network.
- Your own WAF is not suitable as DDoS protection: attack traffic still reaches your server and your internet connection. In addition, the OWASP CRS needs tuning, otherwise it will block legitimate users (false positives).
- Combining them is often best: Cloudflare for DDoS, bots and basic rules, and your own WAF for precise filtering of application traffic next to the server.
6. A WAF does not replace fixing vulnerabilities
A WAF is a shield, not a cure. It is useful when a vulnerability has to be covered immediately while developers fix it (virtual patching) and when you want to get rid of automated traffic. But a WAF does not see authorisation flaws (IDOR), business logic vulnerabilities or insecure APIs, because technically such requests look legitimate. Only penetration testing finds them. If a vulnerability can be fixed in code or in the server configuration, fix it there.
Frequently asked questions
Is Cloudflare WAF free?
Partly. The free plan includes the Free Managed Ruleset, 5 custom rules, 1 rate limiting rule and unmetered DDoS protection. Broader managed rulesets are available from the Pro plan (USD 20 per month, billed annually) [8].
How many custom WAF rules does Cloudflare allow?
Free: 5, Pro: 20, Business: 100, Enterprise: 1,000. Regex in rules is allowed from the Business plan [3].
Does the free Cloudflare plan protect against DDoS attacks?
Yes, DDoS protection at layers 3-7 is unmetered on all plans [5]. However, it does not work if an attacker knows the real server IP address and connects directly (see section 3).
How much does Cloudflare Enterprise cost?
There is no public price; it is contract-based. You pay only for clean traffic: traffic that Cloudflare blocked at the edge of its network, including DDoS attacks, is not charged [17]. In our experience, the price is mostly driven by the volume of legitimate traffic (CDN and Bot Management traffic add up) and the number of domains.
When is the free Cloudflare plan not enough?
When the website has a login, payments or an API: you need broader managed rulesets, a longer rate limiting window, bot protection with exceptions for API paths and complete security event logs.
Sources
- Cloudflare Docs — WAF Managed Rules
- Cloudflare Docs — WAF changelog
- Cloudflare Docs — Custom rules (plan limits)
- Cloudflare Docs — Rate limiting rules (availability)
- Cloudflare Docs — DDoS Protection
- Cloudflare Docs — Leaked credentials detection
- Cloudflare Docs — Bot Fight Mode
- Cloudflare — Plans (pricing)
- Cloudflare Docs — WAF attack score
- Cloudflare Docs — Security Events
- Cloudflare Docs — Protect your origin server
- Cloudflare Docs — Cloudflare Tunnel
- Cloudflare Docs — Authenticated Origin Pulls
- Cloudflare Docs — Cloudflare IP addresses
- GitHub — OWASP Coraza WAF
- OWASP CRS — Core Rule Set
- Cloudflare — Enterprise “Externa” packages
- Cloudflare Docs — Bot Management (Enterprise)
- Cloudflare Docs — http.request.body.raw (request body fields)
- Cloudflare Docs — Logpush custom fields
- Commission Delegated Regulation (EU) 2024/1774 (DORA ICT risk management), Article 12 “Logging”