Skip to content

RouteWardenHigh-Performance Edge & L4 Protocol Defense

Stop sensitive file leaks (.env, .git, backups), protect non-HTTP services (SSH, SMTP, DBs), and block threats before requests reach your backends.

Routewarden - Zero-dependency edge defense for Traefik, Caddy & NGINX | Product HuntRoutewarden - Zero-dependency edge defense for Traefik, Caddy & NGINX | Product Hunt
RouteWarden Logo

What is RouteWarden? ​

RouteWarden is a unified edge defense suite built for reverse proxies and servers. It protects both web traffic (Layer 7) via Traefik, Caddy, and NGINX, as well as infrastructure services (Layer 4) via TCP Warden.

Every server exposed to the public internet gets hammered by automated scanning scripts hunting for .env files, .git trees, backup archives, open databases, and unauthenticated management ports. RouteWarden filters these threats out at the perimeter before they consume backend resources.


30-Second Setup ​

Get protected in seconds with your preferred gateway:

services:
  traefik:
    image: traefik:latest
    command:
      - "--experimental.plugins.routewarden.modulename=github.com/routewarden/traefik-warden"
      - "--experimental.plugins.routewarden.version=v1.4.2"
      - "--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"

Request Inspection Lifecycle ​

RouteWarden evaluates inbound HTTP requests in five stages:

Stage 1
HTTP Verb Filtering
Checks the request method against configured methods (default: ["GET"]). Non-matching methods bypass inspection immediately.
Stage 2
IP Allowlist Check
Checks client IP against allowedIps via socket RemoteAddr, X-Forwarded-For, or X-Real-IP. Trusted addresses bypass checks immediately.
Stage 3
Anti-Evasion Normalization
Decodes multi-layer percent-encoding (%252e%252e), strips matrix parameters (/;param/.env), normalizes backslashes (\), and removes null bytes.
Stage 4
Rule Evaluation
Evaluates safe exemptions (allowPatterns) first. If not exempted, checks built-in sensitive dictionaries and custom blockPatterns.
Stage 5
Response Generation
Executes the configured response mode: custom JSON, HTML, redirect, silent drop, challenge verification, or gzip compression response.

Default Protection Rules ​

With enableDefaultPatterns: true active, RouteWarden blocks common exposure paths without requiring custom rules:

Environment & Secrets

Blocks /.env, /.env.local, /.env.production, /.aws/credentials, and /.ssh/id_rsa.

Version Control Repositories

Prevents source disclosure via /.git/config, /.git/HEAD, /.svn/entries, and /.hg/.

Database Dumps & Backups

Catches accidental exposure of /dump.sql, /db.bak, /backup.tar.gz, and /site.zip.

Configuration & Debug Files

Guards server manifests like /config.yaml, /app.ini, /phpinfo.php, and Spring /actuator/*.


Anti-Evasion Normalization ​

Attackers often obfuscate request paths to bypass string matching. RouteWarden normalizes paths before evaluation:

Evasion TechniqueRaw Attacker PayloadRouteWarden Normalized CandidateAction
Double URL Encoding/%252e%252e/%252eenv/.envBlocked
Semicolon Matrix Traversal/public;param=1/..;param=2/.env/.envBlocked
Windows / Backslash/static\..\.git\config/.git/configBlocked
Null Byte Injection/.env%00.png/.envBlocked
Dot-Segment Traversal/images/../.aws/credentials/.aws/credentialsBlocked

Response Actions ​

When a path matches a block rule, choose how RouteWarden defends your server:

  • Clean Errors & Deception: Return custom json, html, text, xml, or a deceptive fakeSuccess (200 OK honeypot).
  • Active Defense: Crash aggressive bots with gzipBomb (~1000× RAM expansion), reset connections via silentDrop, or delay scanners with tarpit.
  • Challenges & Forwarding: Challenge suspicious traffic with captcha (Turnstile / hCaptcha / reCAPTCHA), rate-limit via rateLimitChallenge (HTTP 429), or divert to a canary backend via proxy.

Production Case Studies ​

Real-world deployment patterns demonstrating how engineering teams protect their applications using RouteWarden:

Immich Photo Sharing

Public photo/album sharing while strictly cloaking administrative, login, and user management APIs under a 404.

Zero-Trust Webhooks

Lock down Stripe/GitHub payment webhook ingress using official provider IP CIDRs and silent TCP drops.

Metrics & Actuator Cloaking

Shield Prometheus /metrics and Spring Boot /actuator from public scanners while keeping internal scrapers active.

WordPress & CMS Shield

Defeat brute-force and XML-RPC attacks on wp-login.php using interactive Cloudflare Turnstile / hCaptcha challenges.

Password Vaults (Bitwarden)

Allow public mobile password sync while restricting /admin strictly to WireGuard or Tailscale subnets.

Honeypots & Active Defense

Crash scanning bots with gzipBomb decompression traps, reset TCP connections with silentDrop, and cloak staging preview clusters.

CrowdSec Integration & Auto-Ban

Emit structured JSON security audit events directly into CrowdSec to automatically ban attacker IPs across your firewall on their first request.


Ready to Explore? ​

Released under the MIT License.