Scanner Defense
Intercepts automated crawlers probing for exposed credentials, source repositories, backups, and administrative endpoints.
Stop sensitive file leaks (.env, .git, backups), neutralize path-evasion attacks, whitelist IPs, and challenge threats before requests reach your upstream services.
RouteWarden is a security middleware for Traefik, Caddy, and NGINX / OpenResty. It runs at your edge router or ingress controller, evaluating inbound requests and blocking reconnaissance scans before they reach backend application containers.
Internet-connected servers receive continuous automated scans looking for .env files, .git trees, database dumps, backup archives, and administrative interfaces. RouteWarden matches these attempts at the proxy level and responds according to your configuration.
RouteWarden evaluates inbound HTTP requests in five stages:
methods (default: ["GET"]). Non-matching methods bypass inspection immediately.allowedIps via socket RemoteAddr, X-Forwarded-For, or X-Real-IP. Trusted addresses bypass checks immediately.%252e%252e), strips matrix parameters (/;param/.env), normalizes backslashes (\), and removes null bytes.allowPatterns) first. If not exempted, checks built-in sensitive dictionaries and custom pathPatterns.With enableDefaultPatterns: true active, RouteWarden blocks common exposure paths without requiring custom rules:
Blocks /.env, /.env.local, /.env.production, /.aws/credentials, and /.ssh/id_rsa.
Prevents source disclosure via /.git/config, /.git/HEAD, /.svn/entries, and /.hg/.
Catches accidental exposure of /dump.sql, /db.bak, /backup.tar.gz, and /site.zip.
Guards server manifests like /config.yaml, /app.ini, /phpinfo.php, and Spring /actuator/*.
Attackers often obfuscate request paths to bypass string matching. RouteWarden normalizes paths before evaluation:
| Evasion Technique | Raw Attacker Payload | RouteWarden Normalized Candidate | Action |
|---|---|---|---|
| Double URL Encoding | /%252e%252e/%252eenv | /.env | Blocked |
| Semicolon Matrix Traversal | /public;param=1/..;param=2/.env | /.env | Blocked |
| Windows / Backslash | /static\..\.git\config | /.git/config | Blocked |
| Null Byte Injection | /.env%00.png | /.env | Blocked |
| Dot-Segment Traversal | /images/../.aws/credentials | /.aws/credentials | Blocked |
When a path matches a block rule, RouteWarden can respond with:
json: Structured JSON payload with customizable status code and body.html: Custom HTML error page.text: Plain text error message.xml: XML-formatted error document.captcha: Human challenge verification using Cloudflare Turnstile, hCaptcha, or Google reCAPTCHA.redirect: HTTP redirect to an external sink or notice page.silentDrop: Immediate TCP connection closure.gzipBomb: Returns a compressed gzip payload that expands in client memory.tarpit: Delivers bytes slowly to hold client connections open.fakeSuccess: Decoy response returning synthetic data with a 200 OK.rateLimitChallenge: Returns HTTP 429 with a standard Retry-After header.proxy: Forwards matching traffic to an internal inspection or canary service.infiniteStream: Continuous stream of pseudorandom data.Get protected in seconds with your preferred gateway:
services:
traefik:
image: traefik:v3.3
command:
- "--experimental.plugins.routewarden.modulename=github.com/routewarden/traefik-warden"
- "--experimental.plugins.routewarden.version=v1.2.1"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.middlewares=warden@docker"
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- "traefik.enable=true"
# Global EntryPoint Shield: protects ALL services automatically
- "traefik.http.middlewares.warden.plugin.routewarden.enabled=true"
- "traefik.http.middlewares.warden.plugin.routewarden.enableDefaultPatterns=true"
webapp:
image: nginx:alpine
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=PathPrefix(`/`)"
- "traefik.http.routers.app.entrypoints=web"Real-world deployment patterns demonstrating how engineering teams and self-hosters protect their applications using RouteWarden:
Public photo/album sharing while strictly cloaking administrative, login, and user management APIs under a 404.
Lock down Stripe/GitHub payment webhook ingress using official provider IP CIDRs and silent TCP drops.
Shield Prometheus /metrics and Spring Boot /actuator from public scanners while keeping internal scrapers active.
Defeat brute-force and XML-RPC attacks on wp-login.php using interactive Cloudflare Turnstile / hCaptcha challenges.
Allow public mobile password sync while restricting /admin strictly to WireGuard or Tailscale subnets.
Crash scanning bots with gzipBomb decompression traps, reset TCP connections with silentDrop, and cloak staging preview clusters.
Emit structured JSON security audit events directly into CrowdSec to automatically ban attacker IPs across your firewall on their first request.
rwarden) to test paths offline, validate configs, and generate gateway files.