VPN HubMenu

Routed VPN control plane

Route devices through a self-hosted VPN hub.

Assign each device an Internet egress and each private subnet a tunnel. VPN Hub applies the routes on Ubuntu 24.04 and blocks traffic when its selected egress is down.

Fail closed on egress failureConfirmation with rollbackDrift checks against configuration
VPN HUB / EXAMPLE STATIC DEMO

Example device route

example revision Β· 4d7c2a
CLIENTlaptop-0110.80.0.2
encrypted tunnel
HUBrouting policyconfigured
selected egress
EGRESSwireguard-euexample tunnel
Namespaceper tunnel
Direct fallbackblocked
Rollbackon timeout

01 / routing configuration

How routing is built

Declare devices, tunnels, and DNS rules in YAML. The agent applies that revision and detects differences between configuration and runtime state.

  1. policy file defines devices, tunnels, egress role, and DNS scope
  2. agent renders namespaces, nftables chains, nft set, and service units from that policy
  3. each provider tunnel has its own network namespace and kill switch

02 / entry and egress

Supported egress and entry paths

Direct egress

Explicit direct route

Direct path is explicit and guarded by policy. It is not an automatic fallback.

WireGuard

Primary tunnel

One tunnel, one namespace, deterministic policy scope.

AmneziaWG

Client entry

Obfuscation settings are part of tunnel profile rotation.

Xray / VLESS

Alternative transport

Per-tunnel namespace and explicit profile handling.

OpenVPN

Provider compatibility

Kept for mixed provider environments.

03 / failure handling

Operational safety model

A failed egress stays blocked. Changes that require confirmation roll back if the confirmation window expires.

04 / routing scenarios

Routing and operations

Split tunnel by destination

Routing

Keep corp, private, and public traffic separate with per-tunnel DNS and namespace policy.

hubctl tunnel routes corp-private --add 203.0.113.0/24

Devices through a selected provider

Connectivity

Assign an egress to each employee device and change that assignment when needed.

hubctl device set-egress laptop corp-egress

Private service access

Security

Expose private subnets only through approved tunnels with DNS pinning.

hubctl tunnel routes corp-private --add 192.0.2.0/24

SOCKS5 app steering

Operations

Send selected application traffic through an assigned tunnel without changing whole host routing.

hubctl routes

Provider migration with rollback

Availability

Test canary candidates, then restore the last-known-good upstream if health fails.

hubctl subscription refresh corp-egress

Device isolation

Security

Reject unplanned client-to-client traffic by default and add explicit ACLs.

hubctl client-acl add phone laptop tcp/22

Incident pause and rollback

Reliability

Stop risky changes and restore previous revision through timer-based confirmation.

hubctl deploy --confirm-within 5m

Private DNS and DNS zone split

Networking

Private names follow tunnel DNS policy, public names keep normal resolver behavior.

hubctl tunnel zones corp-net --add corp.example

Emergency maintenance mode

Ops

Review dependent devices and change their egress before disabling a tunnel.

hubctl tunnel disable corp-egress

Fleet onboarding and profile rotation

Lifecycle

Issue deterministic client profiles with revision-aware identifiers.

hubctl device add laptop --egress corp-egress --address 198.51.100.10/32

Drift correction

Configuration

Validate declared state, then re-apply controlled policy when runtime state diverges.

hubctl validate && hubctl deploy

Read-only health for operators

Monitoring

Track health, drift, and unit status before applying production changes.

hubctl status --format yaml

05 / Telegram operations

Telegram bot operations examples

The bot surfaces operational previews and confirmations, including guarded deploy flow and quick troubleshooting links.

Telegram bot example

πŸš€ Deploy

πŸš€ Deploy Active revision: docs-current-0001 New revision: docs-next-0002 (2 tunnels, 2 devices) Excluded revoked devices: docs-retired Changes: β€’ βž• tunnel docs-private β€’ πŸ”€ docs-laptop: direct β†’ docs-egress β€’ βž• device docs-phone β†’ direct With rollback protection, the agent restores the previous revision if you do not confirm in time, even if the new revision cuts off access.

βœ… With rollback protectionβ€¦βš‘ Apply without protection↩️ Restore previous revision🏠 Menu

πŸ“± Devices

πŸ“± Devices 🟒 docs-laptop β†’ docs-egress β€” online 🚫 docs-phone β†’ direct β€” never connected, revoked

docs-laptopdocs-phoneβž• Add device🏠 Menu

πŸš‡ Tunnels

πŸš‡ Tunnels 🟒 docs-private β€” private-network, wireguard, on ⏸ docs-egress β€” egress, xray, off

docs-privatedocs-egress🩺 Test all🏠 Menu

πŸ“‘ Subscriptions

πŸ“‘ Subscriptions 🟒 docs-egress β€” 203.0.113.44:443 Automatic refresh: every 6h; a candidate must first prove it works in an isolated namespace.

docs-egress🏠 Menu

πŸ“Š Status

πŸ“Š Status Revision: docs-current-0001 (created 2h ago) 2 tunnels, 2 devices ⏳ Awaiting confirmation: revision docs-next-0002, 3m 20s left Agent: 🟒 active (running), restarts: 0 Drift: βœ… host matches the revision

βœ… Confirm↩️ Roll backπŸ”„ Refresh🏠 Menu

πŸ”” Notification settings

πŸ”” Notification settings Intervals: health β€” 5m, drift β€” 30m, subscriptions β€” 6h (configured in telegram.yaml). Categories: Tap a category to toggle it; the selection is stored on the hub and survives bot restarts.

πŸ”” Automatic rollbacks and deploysπŸ”” Agent errorsπŸ”• Convergence (info)πŸ”” Tunnel healthπŸ”” Host driftπŸ”” Subscription refresh resultsπŸ”” Changes outside the bot🏠 Menu
View bot operation docs
Example bot actions: Review changes, Confirm deployment, Inspect devices, Inspect tunnels, Open status, Open settings

06 / operation guides

Cookbook preview

Step-by-step guides for deployments, recovery, segmentation, and provider checks.

Set up your first hub.

Validate the example configuration on a disposable Ubuntu host, then connect one device and verify its route.