Getting Started with TCP Warden
TCP Warden can be deployed in two convenient ways:
- Built into Routewarden CLI (
rwarden tcp): Recommended for unified edge nodes with full daemon supervision, zero-downtime reloads, and multi-protocol tools. - 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 stopFirst-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:9091Output of rwarden tcp status (or tcp-warden status):
🛡️ 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 0Directory & Volume Layout
When deployed in production, TCP Warden organizes files across dedicated paths:
| Path | Volume | What it stores |
|---|---|---|
/etc/routewarden/tcp-warden.yaml | tcp-warden-config | Main configuration file (auto-generated on first boot). |
/var/lib/routewarden | tcp-warden-data | Persistent runtime state: SQLite bans.db, installed plugins, and recompiled binary. |
/var/log/routewarden/tcp-warden.jsonl | tcp-warden-logs | Structured audit log file recording all connection and security events. |
Next Steps
- Explore Configuration Reference to configure proxy listeners, rate limits, and GeoIP rules.
- Review Modular Protocol Plugins to enable database and IoT protocol inspection.
- Optionally set up collaborative community threat defense with CrowdSec Integration (Optional).
- Query health and stream events via Management API & SSE.