Skip to content

Getting Started with TCP Warden ​

TCP Warden can be deployed in two convenient ways:

  1. Built into Routewarden CLI (rwarden tcp): Recommended for unified edge nodes with full daemon supervision, zero-downtime reloads, and multi-protocol tools.
  2. Dedicated Minimal Binary / Container (tcp-warden): A standalone static binary and <15MB Alpine container (ghcr.io/routewarden/tcp-warden:latest) designed for lightweight L4-only edge bastions.

Deployment Options ​

Select your preferred deployment method below:

# 1. Install Routewarden CLI (includes L4 TCP/UDP proxy engine)curl -fsSL https://routewarden.github.io/install.sh | bash# 2. Start TCP proxy in background (detached daemon mode)rwarden tcp up -d# 3. Verify daemon status and active servicesrwarden tcp status# 4. Reload configuration without dropping connectionsrwarden tcp reload# 5. Stop proxy daemon when neededrwarden tcp stop

First-Run Template Auto-Creation

On initial boot, if tcp-warden.yaml does not exist, TCP Warden automatically creates a fully-commented default configuration template ready for immediate use.

Optional: CrowdSec Integration

CrowdSec integration is completely optional. If you want to connect TCP Warden to CrowdSec LAPI for collaborative threat intelligence, automated bouncers, and shared decision lists, follow the dedicated CrowdSec Integration Guide.


Verifying the Daemon ​

TCP Warden exposes an HTTP management endpoint on port 9091 (configurable via api.listen):

# Health checkcurl -s http://127.0.0.1:9091/health# {"status":"ok","version":"5.5.0"}# Active service statscurl -s http://127.0.0.1:9091/stats# Query service status./tcp-warden status --api http://127.0.0.1:9091

Output of rwarden tcp status (or tcp-warden status):

Daemon Status Outputtext
🛡️  TCP Warden Daemon Status (http://127.0.0.1:9091)----------------------------------------------------------------------SERVICE        PROTOCOL   ACTIVE CONNS   TOTAL ALLOWED   TOTAL BLOCKED----------------------------------------------------------------------ssh            ssh        0              12              1smtp           smtp       0              5               0

Directory & Volume Layout ​

When deployed in production, TCP Warden organizes files across dedicated paths:

PathVolumeWhat it stores
/etc/routewarden/tcp-warden.yamltcp-warden-configMain configuration file (auto-generated on first boot).
/var/lib/routewardentcp-warden-dataPersistent runtime state: SQLite bans.db, installed plugins, and recompiled binary.
/var/log/routewarden/tcp-warden.jsonltcp-warden-logsStructured audit log file recording all connection and security events.

Next Steps ​

Released under the MIT License.