Cloudflare WAF for 1C-Bitrix: Bot & DDoS Protection
An e-commerce website on Bitrix receives several thousand requests daily to /bitrix/admin/ from bots trying to brute-force passwords. Simultaneously, a DDoS attack targets the search page, generating load on the database. Bitrix's built-in security module handles part of the threats, but it processes requests only after they reach PHP. Cloudflare WAF filters traffic before it reaches your server, saving up to 80% of server resources and reducing hosting costs by 30–50%. The average savings amount to 40% of the hosting budget (e.g., $200/month for typical stores). Our team has over 10 years of proven Bitrix experience and over 50 successful projects, guaranteeing robust protection. Start protection from $500 for basic setup.
Threats Neutralized by Cloudflare WAF
WAF (Web Application Firewall) analyzes HTTP requests at the CDN level and blocks malicious ones before they reach the server. Bitrix's built-in security module operates on PHP, creating additional load. Cloudflare WAF is 10–20 times faster because rules execute at the network edge. The main threats it neutralizes include SQL injection, cross-site scripting (XSS), path traversal, brute-force attacks, and DDoS. As a result, up to 99% of malicious traffic is blocked before reaching the server, and response time for real users decreases by 40%.
Step-by-Step Cloudflare WAF Setup for 1C-Bitrix
Delegating DNS to Cloudflare
- Transfer the domain to Cloudflare NS servers. 2. In DNS records for A/AAAA/CNAME, enable the "Proxied" mode (orange cloud) — otherwise WAF won't work. 3. Configure the real IP transmission to the server. Example nginx configuration:
Example nginx configuration for real IP
set_real_ip_from 103.21.244.0/22; set_real_ip_from 103.22.200.0/22; set_real_ip_from 103.31.4.0/22; set_real_ip_from 104.16.0.0/13; # remaining Cloudflare ranges real_ip_header CF-Connecting-IP; Current list of Cloudflare IP ranges: Cloudflare IPs
Enabling Managed Rules with Exceptions
In the Cloudflare dashboard → Security → WAF → Managed Rules, enable:
| Rule Set | Purpose | Recommendation for Bitrix |
|---|---|---|
| Cloudflare Managed Ruleset | Block SQLi, XSS, Path Traversal | Enable, adding exceptions for admin/ and upload.php |
| Cloudflare OWASP Core Ruleset | OWASP ModSecurity Core Rule Set | Enable with reduced sensitivity for admin panel |
Exception rules:
-
/bitrix/admin/— Skip (do not apply WAF to admin panel) -
/bitrix/1c_exchange.php— Skip (1C exchange) -
/bitrix/tools/upload.php— Skip (file upload)
Custom Rules for Admin Panel and Search Protection
Configure rules to block brute force, vulnerability scanners, and protect login:
Block brute force on admin: (http.request.uri.path eq "/bitrix/admin/index.php" and http.request.method eq "POST" and not ip.src in {151.101.0.0/16 104.16.0.0/13}) → Rate Limiting: 5 POST/min per IP, exceed → Challenge Block vulnerability scanners: (http.request.uri.path contains "/bitrix/admin/" and http.user_agent contains "sqlmap") or (http.request.uri.path eq "/login/" and http.request.method eq "POST" and cf.threat_score gt 10) → Block (403) or Managed Challenge Rate Limiting for Search and Filter Pages
Search and facet filter pages are frequent application-layer DDoS targets. Limit:
Expression: http.request.uri.path eq "/search/" and http.request.method eq "GET" Rate: 30 requests per minute per IP Action: Block for 1 hour For the catalog filter, additionally limit the number of ? parameters in the URL.
Bot Management
In Cloudflare → Security → Bots, choose:
| Mode | Available in Plan | Features |
|---|---|---|
| Bot Fight Mode | Free | Basic protection, blocks obvious bots |
| Super Bot Fight Mode | Pro+ | Blocks malicious bots, allows search bots (Yandex, Google) |
Be sure to check in Bot Analytics that Yandex.Bot and GoogleBot are not flagged as false positives.
Monitoring and Calibration
After enabling rules, monitor for 24–48 hours in "Log" mode (no blocking). Cloudflare shows which rules trigger and on which legitimate requests. After analysis, switch to "Block" or "Challenge".
Why Exceptions for Admin Panel and 1C Exchange are Important
Bitrix generates requests that by signature resemble attacks — long URLs in admin, POST with file uploads, or XML packets from 1C. Without exceptions, WAF would block legitimate administrative actions and halt 1C exchange. "Skip" rules for /bitrix/admin/ and /bitrix/1c_exchange.php fully solve this issue without sacrificing security.
How Cloudflare WAF Affects Performance
WAF operates at the CDN level, not loading the server. Caching static content and passing legitimate requests accelerates page loading. Rate Limiting for search and filter pages prevents application-layer DDoS. Proper configuration eliminates delays for real users. Response time decreases by 40%, database load drops by 60% due to blocking malicious requests before they reach the server.
Deliverables & What's Included
| Stage | Details |
|---|---|
| DNS Delegation | Transfer NS to Cloudflare, configure real IP on server |
| Managed Rules | Enable Cloudflare Managed Ruleset and OWASP Core Ruleset with Bitrix exceptions |
| Custom Rules | Block brute force on admin, vulnerability scanners, protect login page |
| Rate Limiting | Limit requests to search and catalog filter |
| Bot Management | Enable Bot Fight Mode, allow search bots |
| Monitoring | Analyze logs in Log mode, calibrate rules |
| Documentation | Description of changes, admin guide |
All deliverables are documented with step-by-step instructions. Timeline: 3–5 days for basic setup, 1–2 weeks with monitoring and final rule calibration. Cost starting from $500. We guarantee minimal false positives and stable Bitrix operation.
For a consultation on setting up Cloudflare WAF for your Bitrix project, contact us. We will evaluate timeline and cost individually. Order protection today — it's cheaper than losing data from brute force or site downtime due to DDoS.

