01Pull the live link. Count the pings.
A probe sent 5 pings a second across the bridge for two minutes. About 30 s in, the route of the link carrying the traffic was withdrawn. About 50 s later it was restored. Every point below is a real reply from the measured run, replayed from the raw data. Hover or tap the chart to read any ping.
The honest part. One thing did not survive: an SSH session streaming a line every 0.2 s stopped at the switch, at t = 34.4 s, after 140 lines. That is by design. Both ends masquerade, so after a failover the far host sees a new source address and the old TCP connection cannot continue. Pings and every new connection went straight through the twin. New connections never notice; long sessions reconnect. Use autossh or mosh for shells and a retry for copies.
02A dead tunnel heals in seconds, not a minute.
NetBird sees gateways, not tunnels. A gateway whose WireGuard link has died still looks healthy to the mesh, so its clients keep sending into a black hole. So every gateway checks its own tunnel. We killed the tunnel on a live gateway and measured the gap at two heal intervals.
The 10 second tick is not a guess: it cut the outage from 56.8 s to 2.6 s, about 22 times shorter. If the interface is gone, the heal restarts it at once. If it is up but the newest handshake is older than 5 minutes (lapsed port mapping, lost NAT state, a new public IP), it renews the mapping first, then restarts, at most once per 10 minutes.
03Two meshes. Two bridges. One HA route.
Link A is gw-a1 to gw-b1, link B is gw-a2 to gw-b2: different hosts, different /30, different UDP port. Nothing is shared but the internet uplink. Pick a scenario to see what the clients do.
Want every edge labelled? Open the interactive topology diagram ↗ (pan, zoom, dark and light).
04How it works
No VRRP, no floating IP, no BGP. Plain WireGuard, one NetBird feature used exactly as designed, and three small scripts.
The links
Each link is a point-to-point WireGuard interface,wg-estate, between one gateway on each side: link A on192.0.2.0/30and UDP 51830, link B on192.0.2.4/30and UDP 51831. The dialling side keepsPersistentKeepalive = 25; the listening side can renew a UPnP mapping from a timer. Both ends masquerade.The HA route
Each mesh publishes the other site's network (or just the exact/32s it exposes) through both gateways: same network ID, same metric. NetBird treats that as a high-availability set. Each client picks one routing peer and moves to the other when its route or peer goes away. That is the whole failover mechanism.Deny by default, by name
Each side decides exactly which of its hosts the other may reach.estate-allow-syncfills anESTATE-ALLOWchain from a file of host names, resolved fromnetbird status --jsonevery 2 minutes, because a re-enrolled host gets a new mesh address and a hand-kept IP list goes stale without a sound. If NetBird cannot be read, the chain is left as it is.Self-heal
estate-link-healruns on every gateway every 10 seconds and restarts a dead tunnel at once, or renews the port mapping and restarts a stale one.Watch
estate-link-watchruns from cron, reads each link's newest handshake and sends one alert when a link goes down and one when it comes back, grouped per link, so a flapping link does not flood the room. The alert text carries nothing from the other side.
05The failure matrix
Every way it breaks, who notices, and what the clients see.
| What fails | Who notices | What clients see |
|---|---|---|
| A gateway's route is withdrawn (maintenance, admin) | NetBird management | Nothing. Measured: 0 of 600 pings lost, longest pause 0.36 s to 1.0 s |
| A gateway host leaves the mesh (power, reboot, netbird stopped) | NetBird marks the peer disconnected | A short pause while clients switch to the twin |
| The tunnel dies on a live gateway | estate-link-heal (10 s) | Up to one heal tick of loss for clients on that gateway. Measured: 2.6 s |
| The WAN path or port mapping dies behind a live gateway | estate-link-heal after 5 min, estate-link-watch after 10 min | Clients on that gateway lose the path until the heal fixes it or an operator withdraws that route. Clients on the twin are unaffected |
| Both links down | estate-link-watch alerts for both | Nothing crosses. The estates stay isolated (fail closed) |
| A host on the allowlist is re-enrolled with a new mesh IP | estate-allow-sync (2 min) | At most 2 minutes without access to that one host |
06What it is, and what it is not
not bondingFailover, not double throughput
- Each site usually has one internet uplink. Two tunnels over one uplink share its bandwidth.
- NetBird HA is active/standby per client. A client uses one routing peer at a time.
- Each gateway masquerades, so a flow is pinned to the path it started on, and established TCP is cut on a switch.
- You can still spread load: give different client groups different preferred gateways with a lower metric, and each group fails over to the other's gateway.
New connections never notice. Long sessions reconnect.
securityThe model in one screen
- The two meshes never trust each other's management server. Nothing is merged, no peer is shared.
- Each side publishes only what it chooses:
/32s on the dialling side, host names on the listening side. - Nothing can start a connection to a gateway from across the link: INPUT allows replies only.
- Masquerade on both ends: neither mesh learns the other's addresses.
- Every allowlist change is logged to the journal, with what was added and what was removed.
- Alerts carry no data from the other estate.
07Prove it on your own estate
Do not take our chart for it. The drill is four steps and two minutes, and it is how the numbers above were made.
wg show transfer counters on both gateways around a short ping burst.# 1. which link is live? compare transfer counters before and after a short ping burst ssh gw-a1 sudo wg show wg-estate transfer; ssh gw-a2 sudo wg show wg-estate transfer # 2. probe: 600 pings at 5/s (2 minutes), with timestamps and "no answer" lines ping -D -O -i 0.2 -c 600 <host on site-b> > drill.txt & # 3. at ~30 s withdraw the live route; at ~75 s restore it (NetBird API, admin token) API=https://<site-a management>/api; H="Authorization: Token $TOKEN" r=$(curl -s -H "$H" $API/routes/$ROUTE_ID) curl -s -X PUT -H "$H" -H 'Content-Type: application/json' $API/routes/$ROUTE_ID \ -d "$(echo "$r" | jq 'del(.id) | .enabled=false')" # ... later, the same with .enabled=true # 4. count wait; tail -2 drill.txt; grep -c 'no answer' drill.txt
The second drill kills the tunnel on the live gateway (sudo wg-quick down wg-estate) and checks that the heal brings it back within one tick. Measured: 2.6 s of loss. To take a gateway out for maintenance, disable its route entry on both meshes first: clients move with zero loss.
08skmesh: the mesh under it
HA estate links is a pattern built on skmesh, the skstacks service for a self-hosted WireGuard mesh: NetBird management, signal, relay and dashboard, with Postgres, optional bundled coturn and Traefik in front. Each estate runs its own skmesh, with its own management server, its own users and its own policies.
Your own control plane
No third-party coordination service. Peers, keys, routes and policies live in your Postgres.
SSO or embedded IdP
NetBird's embedded IdP by default, with nothing else to deploy, or your cluster's Authentik SSO, provisioned automatically and idempotently.
TURN and relay
Peers behind strict NAT still connect, through bundled coturn or an external TURN server.
Graceful 503
While a backend is down, Traefik answers 503, so NetBird clients keep retrying instead of giving up.
Approval alerts
New peers waiting for approval are announced to your alerts room, so nobody joins in the dark.
HA estate links
Two meshes, two self-healing bridges, one HA route. Failover measured with zero lost pings, and the meshes are never merged.
09Built on
creditBuilt on NetBird and WireGuard
- NetBird is the mesh: management, signal, relay and dashboard. Its client and most of its code are BSD-3-Clause, and its management, signal and relay components are AGPL-3.0. The HA route that carries the failover is a NetBird feature, used as designed. skmesh runs the pinned upstream images.
- WireGuard carries the bridges. "WireGuard" is a registered trademark of Jason A. Donenfeld.
- skmesh and the estate-link scripts are part of skstacks, AGPL-3.0. This site is MIT licensed.
Part of the ecosystem
SKStacks is the framework skmesh deploys through, sknet shows the flows that cross the mesh, and sksec guards the edge it sits behind. All part of SKWorld, the sovereign AI ecosystem where you own the whole stack.