Skip to content
Browse the documentation

VPN (WireGuard)

Reach hosts behind a firewall from AgentLock with WireGuard credentials for SSH, HTTP and MCP traffic.

What is the WireGuard credential for?

A WireGuard credential lets AgentLock route outbound connections through a private VPN tunnel — useful when the hosts you want to reach (SSH servers, MCP servers, internal HTTP endpoints) live behind a firewall and aren't directly reachable from AgentLock's servers over the public internet.

Typical flows:

  • SSH to internal servers: link the WireGuard credential to an SSH credential via the VPN dropdown. ssh.run opens a per-request tunnel, the SSH socket is bound through it, and tear-down happens automatically after the command finishes.
  • HTTP/MCP against internal APIs: same pattern — link the WireGuard credential to an HTTP or MCP credential; the connector routes its outbound fetches through the tunnel.

All other AgentLock guarantees stay intact: action approvals, redaction, audit events, and SSRF checks still run. The tunnel only changes which network the request travels over.

How do I add a WireGuard credential?

Go to Credentials → Add Credential → WireGuard. Paste a standard wg-quick-style config:

text
[Interface]
PrivateKey = <your client private key>
Address = 10.8.0.2/24
DNS = 10.8.0.1

[Peer]
PublicKey = <server public key>
PresharedKey = <optional>
Endpoint = vpn.example.com:51820
AllowedIPs = 10.8.0.0/24, 192.168.10.0/24
PersistentKeepalive = 25

AgentLock validates the config at save time (port range, CIDR bounds, duplicate sections) and refuses AllowedIPs broader than /8 to prevent accidental allow-list misuse. Once saved, the config is envelope-encrypted; it is decrypted just-in-time, only when a request needs the tunnel.

Are VPN tunnels available on my plan?

WireGuard credentials and active tunnels are metered per workspace:

  • Free — 0 VPN credentials.
  • Pro — Up to 3 VPN credentials, limited concurrent tunnels.
  • Team — Up to 10 VPN credentials, higher concurrency.

What do you store about VPN traffic?

Metadata only:

  • Audit events — vpn_tunnel_opened, vpn_tunnel_closed, vpn_tunnel_failed with the request id and TUN interface name.
  • Transient runtime metadata used only while the command is executing so orphaned tunnels can be cleaned up after a service restart.

We do not log the tunnel contents, the WireGuard private key, the preshared key, or the peer endpoint beyond what the redaction layer allows. Keys are deleted from memory as soon as the request finishes.

VPN (WireGuard) | AgentLock Docs