{{#MOVED}}

This page has a new home — update your bookmark.

{{/MOVED}} {{#ERROR}}
{{ERROR}}
{{/ERROR}} {{#FLASH}}
{{FLASH}}
{{/FLASH}} {{#NEED_SECRET}}
Changing a WireGuard tunnel also needs secret:*:write (every apply re-materializes the server key). Your account has interface write but not secret write, so this page is read-only for you.
{{/NEED_SECRET}} {{#VIEW_LIST}}

WireGuard

Every tunnel on this router, with what actually matters: its role, whether its port survives a reboot, which peers are connected, and whether it matches what is configured.

{{#CAN_EDIT}}New tunnel{{/CAN_EDIT}}
{{#HAS_TUNNELS}}
{{#TUNNEL_ROWS}} {{/TUNNEL_ROWS}}
TunnelRolePortPeersFirewallDrift
{{T_NAME}}{{#T_RD_BADGE}} rd {{T_RD_ID}}{{#T_RD_HAS_NAME}} · {{T_RD_NAME}}{{/T_RD_HAS_NAME}}{{/T_RD_BADGE}}{{#T_HAS_ADDR}}
{{T_ADDR}}
{{/T_HAS_ADDR}}
{{#T_HAS_ERROR}}status unavailable{{/T_HAS_ERROR}}{{^T_HAS_ERROR}}{{#T_ROLE_SET}}{{T_ROLE_LABEL}}{{/T_ROLE_SET}}{{^T_ROLE_SET}}role not set{{/T_ROLE_SET}}{{/T_HAS_ERROR}} {{#T_PORT_FIXED}}{{T_PORT}} fixed{{/T_PORT_FIXED}}{{#T_PORT_EPHEMERAL}}ephemeral{{#T_HAS_LIVE_PORT}} {{T_LIVE_PORT}}{{/T_HAS_LIVE_PORT}}{{/T_PORT_EPHEMERAL}}{{#T_PORT_NONE}}none (client){{/T_PORT_NONE}} {{#T_HAS_PEERS}}{{T_CONNECTED}} connected {{T_STALE}} stale {{T_NEVER}} never {{T_DISABLED}} disabled{{/T_HAS_PEERS}}{{^T_HAS_PEERS}}no peers{{/T_HAS_PEERS}} {{#T_FW_NONE}}—{{/T_FW_NONE}}{{#T_FW_UNKNOWN}}unknown{{/T_FW_UNKNOWN}}{{#T_FW_OFF}}pf off{{/T_FW_OFF}}{{#T_FW_OK}}ok{{/T_FW_OK}}{{#T_FW_MISSING}}{{T_FW_N}} missing{{/T_FW_MISSING}}{{#T_FW_DRIFTED}}{{T_FW_N}} drifted{{/T_FW_DRIFTED}} {{#T_DRIFT_OK}}in sync{{/T_DRIFT_OK}}{{#T_DRIFT_DRIFT}}drift{{/T_DRIFT_DRIFT}}{{#T_DRIFT_ERROR}}error{{/T_DRIFT_ERROR}}{{#T_DRIFT_SKIP}}not checked{{/T_DRIFT_SKIP}} Manage
{{/HAS_TUNNELS}} {{^HAS_TUNNELS}}
No WireGuard tunnels yet.{{#CAN_EDIT}} Create the first one -- a remote-access server, a site-to-site link or an outbound client.{{/CAN_EDIT}}
{{/HAS_TUNNELS}}
{{/VIEW_LIST}} {{#VIEW_NEW}}

New tunnel

Answer one question and the rest is derived: the port, the keepalive, what to hand out.

1 · Purpose2 · Settings3 · Done
{{#STEP1}}

What is this tunnel for?

Remote-access serverLaptops and phones connect to this router. It listens on a fixed port and hands each device its own config.Needs: a fixed port, a device pool, a firewall pass-in, NAT if devices browse through it. Site-to-siteConnect another router's LAN to this one. Both ends listen; either can start the handshake.Needs: a fixed port on both ends, the far router's key and subnets, forwarding. ClientThis router dials out to a provider or hub. No port to open; the full-tunnel form is guarded by the auto-revert window.Needs: the provider's key and endpoint, keepalive, full or split tunnel.
{{/STEP1}} {{#STEP2}}

{{ROLE_LABEL}}

Change purpose
{{#ROLE_SERVER}}

This router's address inside the tunnel. Devices get the next free address in the same block, which becomes the device pool ({{POOL_PREVIEW}}).

UDP. Fixed so it survives a reboot; 51820 is the convention.

Prefilled with the egress address{{#HAS_EGRESS}} ({{EGRESS_ADDR}}){{/HAS_EGRESS}}. Use a DNS name or the public IP if this router sits behind NAT -- a prefill, not a fact.

Written into each device config. The tunnel address when this router serves DNS.

{{/ROLE_SERVER}} {{#ROLE_SITE}}

A /30 for the two routers; the far router takes the other address.

UDP, fixed. The far router dials this.

From the other side.

IP address or DNS name, with port. A name is resolved when the tunnel is applied and re-resolved by the router whenever the peer goes silent.

Installed as AllowedIPs, and routed through the tunnel: the router adds a route for each network beyond the tunnel's own subnet when the tunnel is saved. Your side's paste block (public key, endpoint, your subnets{{#HAS_LOCAL_SUBNETS}} {{LOCAL_SUBNETS}}{{/HAS_LOCAL_SUBNETS}}) is shown after the tunnel is created.

{{/ROLE_SITE}} {{#ROLE_CLIENT}}

From the provider or hub config.

IP address or DNS name, with port. A name is resolved when the tunnel is applied and re-resolved by the router whenever the peer goes silent.

Usually assigned by the provider.

Tunnel mode
{{/ROLE_CLIENT}} {{#WAN_CONFIRM}}
{{/WAN_CONFIRM}}
Advanced settings

Allocated automatically ({{NEXT_WG}} is next).

1420 is the wg(4) default.

{{WG_RD_CREATE}}

Applied to the far peer this wizard adds. 25 is the convention; 0 turns it off.

30 to 300. Only used when the apply touches the management path.

Server key
Cancel
{{/STEP2}} {{/VIEW_NEW}} {{#VIEW_PENDING}}

Confirm tunnel

{{PENDING_REMAINING}} s

{{PENDING_IFACE}} is live but routes the management path, so it is awaiting confirmation and reverts by itself unless you keep it. If you lose connectivity, do nothing: it backs out at the deadline.

{{/VIEW_PENDING}} {{#VIEW_TUNNEL}} {{#LOAD_ERROR}}
{{LOAD_ERROR}}
{{/LOAD_ERROR}} {{^LOAD_ERROR}}

{{IFACE}}

{{#ROLE_UNSET}}role not set{{/ROLE_UNSET}}{{^ROLE_UNSET}}{{ROLE_LABEL}}{{/ROLE_UNSET}}{{WG_RD_BADGE}} {{#DRIFT_OK}}in sync{{/DRIFT_OK}}{{#DRIFT_DRIFT}}drift{{/DRIFT_DRIFT}}{{#DRIFT_ERROR}}error{{/DRIFT_ERROR}}{{#DRIFT_SKIP}}not checked{{/DRIFT_SKIP}} {{^LIVE_PRESENT}}down{{/LIVE_PRESENT}}

{{TUNNEL_ADDR}}

Interface page {{#CAN_EDIT}}{{#ROLE_SERVER}}{{/ROLE_SERVER}}{{/CAN_EDIT}}
{{#PENDING}}

Confirm change

{{PENDING_REMAINING}} s

{{#PENDING_ROTATE}}The server key of {{PENDING_IFACE}} was rotated and is live behind an auto-revert window. Give every peer the new public key shown below; each one reads stale until it is re-keyed. Keep the change to remove the previous key from the store, or let it revert to the previous key at the deadline.{{/PENDING_ROTATE}}{{^PENDING_ROTATE}}A change to {{PENDING_IFACE}} is live behind an auto-revert window. Keep it, or let it revert at the deadline.{{/PENDING_ROTATE}}

{{/PENDING}}
Listen port
{{#PORT_FIXED}}{{LISTEN_PORT}} fixed{{/PORT_FIXED}}{{#PORT_EPHEMERAL}}ephemeral{{#HAS_LIVE_PORT}} {{LIVE_PORT}}{{/HAS_LIVE_PORT}}{{#CAN_EDIT}}
{{/CAN_EDIT}}{{/PORT_EPHEMERAL}}{{#PORT_NONE}}none (client) -- this router only dials out{{/PORT_NONE}}
Server public key
{{PUBLIC_KEY}}
MTU
{{MTU}}
Inside
{{WG_RD_INSIDE}}
Outside
{{WG_RD_OUTSIDE}}
{{#ROLE_SERVER}}
Public address
{{#HAS_PUBLIC_HOST}}{{PUBLIC_HOST}}:{{LISTEN_PORT}}{{/HAS_PUBLIC_HOST}}{{^HAS_PUBLIC_HOST}}not set -- edit the settings below{{/HAS_PUBLIC_HOST}}
{{/ROLE_SERVER}}

{{#ROLE_SERVER}}Devices{{/ROLE_SERVER}}{{^ROLE_SERVER}}Peers{{/ROLE_SERVER}}

status from the last handshake{{#HAS_PEERS}}, refreshed every 5 s{{/HAS_PEERS}}
{{#PEERS_TRUNCATED}}
This tunnel has more peers than can be shown and edited safely from the web UI. Manage its peers on the device instead -- editing here is disabled to avoid dropping peers.
{{/PEERS_TRUNCATED}} {{#HAS_PEERS}}
{{#PEER_ROWS}} {{/PEER_ROWS}}
NameStatusLast handshakeEndpointAllowed IPsTransfer
{{#P_HAS_NAME}}{{P_NAME}}{{/P_HAS_NAME}}{{^P_HAS_NAME}}unnamed{{/P_HAS_NAME}}
{{P_KEY_SHORT}}…{{#P_HAS_PSK}} · PSK{{/P_HAS_PSK}}
{{#P_ST_CONNECTED}}connected{{/P_ST_CONNECTED}}{{#P_ST_STALE}}stale{{/P_ST_STALE}}{{#P_ST_NEVER}}never{{/P_ST_NEVER}}{{#P_ST_DISABLED}}disabled{{/P_ST_DISABLED}} {{P_HS}} {{#P_HAS_ENDPOINT}}{{P_ENDPOINT}}{{/P_HAS_ENDPOINT}}{{^P_HAS_ENDPOINT}}waits for the peer{{/P_HAS_ENDPOINT}} {{P_AIPS}} {{#P_HAS_XFER}}↓ {{P_RX}} ↑ {{P_TX}}{{/P_HAS_XFER}}{{^P_HAS_XFER}}—{{/P_HAS_XFER}} {{#P_CAN_EDIT}}Edit
{{/P_CAN_EDIT}}
{{/HAS_PEERS}} {{^HAS_PEERS}}
No peers yet. {{#ROLE_SERVER}}Add a device: this page hands it its config and a QR code. A peer that already has a key is added by its public key.{{/ROLE_SERVER}}{{#ROLE_SITE}}Add the far side's public key.{{/ROLE_SITE}}{{#ROLE_CLIENT}}Add the provider's public key and endpoint.{{/ROLE_CLIENT}}{{#ROLE_UNSET}}Set the role first so the right controls appear.{{/ROLE_UNSET}}
{{/HAS_PEERS}}
{{#ROLE_UNSET}}

Role

This tunnel predates roles. Setting one tells the page what to derive -- the port rule, the right peer controls. Nothing about the interface changes until you fix the port or add rules.

{{#CAN_EDIT}}
{{#PORT_EPHEMERAL}}{{/PORT_EPHEMERAL}}
{{/CAN_EDIT}}
{{/ROLE_UNSET}} {{#ROLE_SERVER}}

Device pool

{{POOL}}
{{#HAS_POOL}}

{{POOL_USED}} of {{POOL_SIZE}} addresses used (router + {{COUNT_PEERS}} devices). Each device gets the next free /32; two devices can never hold one address -- the router refuses it.

{{/HAS_POOL}} {{^HAS_POOL}}

No device pool is stored for this tunnel; set the role again or recreate it through the wizard to derive one.

{{/HAS_POOL}}
Internet through tunnel
{{#DEVICES_INTERNET}}Yes, a NAT rule is offered{{/DEVICES_INTERNET}}{{^DEVICES_INTERNET}}No, split only{{/DEVICES_INTERNET}}
DNS for devices
{{#HAS_DEVICE_DNS}}{{DEVICE_DNS}}{{/HAS_DEVICE_DNS}}{{^HAS_DEVICE_DNS}}—{{/HAS_DEVICE_DNS}}
{{#CAN_EDIT}}
Edit settings

A changed public address or DNS does not reach devices already provisioned -- they keep the config they were given. Re-provision a device to update it.

{{WG_RD_SETTINGS}}
{{/CAN_EDIT}}
{{#CAN_EDIT}}

Add device

{{#DEVICE_REFUSED}}

{{DEVICE_ERROR}}

{{^DEVICE_RATE_LIMITED}}

{{DEVICE_DESCR}} at {{DEVICE_ADDR}} was not added.{{#DEVICE_PSK_STORED}} Its pre-shared key is already in the secret store, so Retry sends the apply alone -- the same key, address and name, no second paste.{{/DEVICE_PSK_STORED}}{{#DEVICE_OFFER_REGEN}} The config you saved was never valid on this router: generate again for a fresh address and new keys.{{/DEVICE_OFFER_REGEN}}

{{/DEVICE_RATE_LIMITED}} {{#DEVICE_RATE_LIMITED}}

Nothing was stored for {{DEVICE_DESCR}}. The config you saved carries a pre-shared key the router could not take; generate again without one, or add the device later.

{{/DEVICE_RATE_LIMITED}}
{{^DEVICE_RATE_LIMITED}}
{{#DEVICE_PSK_STORED}}{{/DEVICE_PSK_STORED}}
{{/DEVICE_RATE_LIMITED}} {{#DEVICE_OFFER_REGEN}}
{{#DEVICE_PSK_STORED}}{{/DEVICE_PSK_STORED}}{{#DEVICE_RATE_LIMITED}}{{/DEVICE_RATE_LIMITED}}
{{/DEVICE_OFFER_REGEN}}
{{#DEVICE_PSK_STORED}}{{/DEVICE_PSK_STORED}}
{{/DEVICE_REFUSED}} {{^DEVICE_REFUSED}}

The device's private key is generated in this browser and never sent to the router. The router stores only the public key and the address.

Shown as the peer name; written as wgdescr on the router.

{{#HAS_POOL_FREE}}The next free address in the pool; the router refuses one already taken.{{/HAS_POOL_FREE}}{{^HAS_POOL_FREE}}The pool has no free address left -- widen it, or remove a device.{{/HAS_POOL_FREE}}

Paste it from wg genkey | tee private | wg pubkey on the device. A browser that can generate the keypair itself hides this field.

{{^HAS_DEVICE_ENDPOINT}}

Set the public address devices dial (the pool card's settings) first; a device config needs an endpoint.

{{/HAS_DEVICE_ENDPOINT}}
{{/DEVICE_REFUSED}}
{{/CAN_EDIT}} {{/ROLE_SERVER}} {{#ROLE_SITE}}

For the far router

Paste this on the other side. It carries this router's public key, where to reach it{{^HAS_PUBLIC_HOST}} (the egress address -- set a public address below if this router sits behind NAT){{/HAS_PUBLIC_HOST}}, and the subnets behind it, derived from the interfaces configured now.

{{PASTE_BLOCK}}
{{#CAN_EDIT}}
Edit settings
{{WG_RD_SETTINGS}}
{{/CAN_EDIT}}
{{/ROLE_SITE}} {{#ROLE_CLIENT}}

Provider

Mode
{{#MODE_FULL}}Full tunnel (the default route goes through it){{/MODE_FULL}}{{^MODE_FULL}}Split tunnel{{/MODE_FULL}}
LAN through tunnel
{{#LAN_NAT}}Yes, a NAT rule is offered{{/LAN_NAT}}{{^LAN_NAT}}No{{/LAN_NAT}}
{{#CAN_EDIT}}
{{WG_RD_SETTINGS}}
{{/CAN_EDIT}}
{{/ROLE_CLIENT}}

Firewall

{{#FW_READABLE}}{{#FW_PF_ENABLED}}PF enabled{{/FW_PF_ENABLED}}{{^FW_PF_ENABLED}}PF disabled{{/FW_PF_ENABLED}}{{/FW_READABLE}}{{^FW_READABLE}}firewall not readable{{/FW_READABLE}}
{{#ROLE_UNSET}}

Rules are derived from the role. Set the role first.

{{/ROLE_UNSET}} {{^ROLE_UNSET}} {{#FW_HAS_ROWS}}
    {{#FW_ROWS}}
  • {{R_TEXT}}
    {{R_WHY}} {{R_ID}}
    {{#R_ST_PRESENT}}present{{/R_ST_PRESENT}}{{#R_ST_MISSING}}missing{{/R_ST_MISSING}}{{#R_ST_DRIFTED}}drifted{{/R_ST_DRIFTED}}{{#R_ST_UNKNOWN}}unknown{{/R_ST_UNKNOWN}}
  • {{/FW_ROWS}}
{{/FW_HAS_ROWS}} {{#FW_NOTES}}

{{N_TEXT}}

{{/FW_NOTES}} {{#FW_LEGACY}}

The firewall still uses raw pf.conf rules, so these rows cannot be reconciled or added from here. Convert it to the visual editor on the firewall page first.

{{/FW_LEGACY}} {{#FW_OFFER}}
Nothing is applied from here. The rows are added to the firewall editor for you to review and save under its own auto-revert window.
{{/FW_OFFER}} {{#FW_NEED_PF_WRITE}}

{{FW_MISSING}} rule{{^FW_MISSING_ONE}}s{{/FW_MISSING_ONE}} missing. Adding them to the firewall editor needs firewall write permission.

{{/FW_NEED_PF_WRITE}} {{#FW_PF_OFF_MISSING}}

PF is disabled: nothing to do. When you enable it on the firewall page, come back here to add the missing rows.

{{/FW_PF_OFF_MISSING}} {{#FW_RECONCILED}}

Reconciled by the identity comment on each rule, so a hand-edited rule reads as drifted, never as missing.{{#FW_HAS_DRIFTED}} {{FW_DRIFTED}} drifted: review on the firewall page.{{/FW_HAS_DRIFTED}}

{{/FW_RECONCILED}}

net.inet.ip.forwarding: {{#FW_FWD_KNOWN}}{{FW_FWD}}{{/FW_FWD_KNOWN}}{{^FW_FWD_KNOWN}}unknown{{/FW_FWD_KNOWN}}{{#FW_FWD_OFF}} off{{/FW_FWD_OFF}} Network tuning

{{/ROLE_UNSET}}
{{#CAN_EDIT}}

{{#EDITING}}Edit peer{{/EDITING}}{{^EDITING}}Add peer{{/EDITING}}

Written as wgdescr on the router; shown beside the key. No double quote or backslash.

{{#EDITING}}

A different key is a different peer: remove this one and add the new one.

{{/EDITING}}

The addresses this peer may send and receive through the tunnel.{{#EDITING}} Changing these re-adds the peer live; its pre-shared key is kept by reference.{{/EDITING}}

IP address or DNS name, with port; blank when the peer dials in. A name is resolved at apply and re-resolved whenever the peer goes silent.

25 for a peer behind NAT; 0 or blank = off.

Mixed into this peer's handshake. Stored in the secret store, sent once, never shown again.{{#EDITING}} Leave blank to keep the existing one.{{/EDITING}}

{{#EDITING}}Cancel{{/EDITING}}
{{/CAN_EDIT}}

Checks

{{#CHECKS_HAS_FAIL}}{{CHECKS_FAIL}} failing {{/CHECKS_HAS_FAIL}}{{#CHECKS_HAS_WARN}}{{CHECKS_WARN}} warning{{^CHECKS_WARN_ONE}}s{{/CHECKS_WARN_ONE}}{{/CHECKS_HAS_WARN}}{{#CHECKS_CLEAR}}all clear{{/CHECKS_CLEAR}}
    {{#CHECK_ROWS}}
  • {{C_TITLE}}
    {{C_REMEDY}}
    {{#C_ACT_FIX_PORT}}
    {{/C_ACT_FIX_PORT}}{{#C_ACT_ADD_RULES}}
    {{/C_ACT_ADD_RULES}}{{#C_ACT_PING}}{{/C_ACT_PING}}{{#C_ACT_LINK}}{{C_LABEL}}{{/C_ACT_LINK}}
  • {{/CHECK_ROWS}}

Computed at page load{{#HAS_PEERS}}; the peer rows follow the 5 s status poll{{/HAS_PEERS}}. A row marked · was not checked or needs nothing.

Tools

diagd, unchanged: ping and capture
{{#TOOLS_ANY}}
{{#TOOL_PING}}{{/TOOL_PING}} {{#TOOL_CAPTURE}}{{/TOOL_CAPTURE}} {{#TOOL_LOGS}}{{/TOOL_LOGS}}
Pick a tool. Output streams here.

The tools need JavaScript; the Diagnostics page runs the same ping and capture.

{{/TOOLS_ANY}} {{^TOOLS_ANY}}

No tool is available to this session: ping needs diag:run, capture diag:capture, the log feed log:*:read.

{{/TOOLS_ANY}}
{{#CAN_EDIT}}

Danger zone

Rotating the server key generates a new keypair in the secret store and applies it live behind a {{CONFIRM_TIMEOUT}} s auto-revert window; every peer must be given the new public key before it can connect again. The previous key is kept in the store until you keep the change.

Deleting the tunnel destroys the interface; the server key is kept only if you say so.

{{/CAN_EDIT}} {{/LOAD_ERROR}} {{/VIEW_TUNNEL}}