By the end of this guide the WAF Auto-Block service will be running, polling your Cloudflare zone’s WAF analytics on a 15-second cycle, and automatically adding offending IPs to your account-level IP list when they exceed your configured rule threshold. You will also have confirmed the service is healthy by checking theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/proteo5/waf-autoblock/llms.txt
Use this file to discover all available pages before exploring further.
/status endpoint. Completing these steps takes about 10 minutes assuming your Cloudflare resources are already in place — if they are not, complete Cloudflare Setup first.
- Docker
- Local (.NET)
Copy the environment file template
From the root of the repository, copy
.env.example to waf-autoblock.env. This file is read by Docker Compose and is excluded from the Docker build context so your credentials are never baked into an image.Fill in your credentials and first rule
Open Replace
waf-autoblock.env in your editor and populate the required values. At minimum you need the four Cloudflare credentials and at least one enabled rule.your-scoped-api-token, your-zone-id, your-account-id, and <cloudflare-rule-id> with real values. The $$auto_blocked_ips double-dollar prefix is required when using Docker Compose so Compose passes the literal string $auto_blocked_ips to the container rather than trying to expand it as a shell variable.The
Cloudflare__BlocklistId field accepts either the raw UUID of your account-level IP list or the symbolic name prefixed with $ (e.g. $auto_blocked_ips). When a symbolic name is configured, the service looks up the matching list UUID from the Cloudflare API on its first API call and caches the result for subsequent requests.Build and start the container
./data into the container so the SQLite database persists across container restarts. On first startup you will see log lines for SQLite store initialization, polling cycle start, and Cloudflare API calls.