NC STATE LINUX USERS’ GROUP · OCTOBER 16 · RALEIGH
How two machines
find each other.
WireGuard is the tunnel. NetBird handles the keys, NAT traversal, and the fallback when a direct path is impossible.
Brandon Hopkins · Head of Content and Developer Relations, NetBird
Brandon Hopkins
When I was younger I tinkered with Xbox, ran a side business fixing computers, and built Minecraft servers.
-
TechHut
Linux, homelabs, and self-hosting.
Videos and guides at techhut.tv. -
NetBird
I work on the docs, demos, and explaining what happens after
netbird up.
Two machines behind NAT
I want to SSH from my laptop to my homelab.
A laptop on campus wants to reach a homelab at home. Both have private addresses behind a router. Neither has an inbound port forward.
Encryption needs a working path before it can help.
What WireGuard handles
A public key identifies the peer.
AllowedIPs
ties that key to tunnel addresses.
-
Sending
The destination address selects the peer.
-
Receiving
The decrypted source address must match that peer’s AllowedIPs.
-
Transport
Encrypted packets over UDP. No built-in TCP fallback.
Key distribution, address assignment, and NAT traversal live outside WireGuard.
How the peers connect
- Register: clients send public keys to Management, which provides addresses and policy.
- Find a path: STUN discovers public addresses. Signal exchanges encrypted candidates.
- Connect: WireGuard carries traffic directly when possible, or through a relay.
- 1. RegisterSign in. Get the network map.
- 2. Find a pathDiscover addresses. Test candidates.
- 3. ConnectSend encrypted traffic.
Management distributes trust
Both clients register their public keys and receive a network map. Their private keys stay on the machines. Management distributes policy; each client applies access rules locally.
Overlay addresses
An account uses a /16 within 100.64.0.0/10.
Access rules
Management distributes policy. Clients enforce it locally.
Discover an address, then test it
-
STUN observes Peer A at
203.0.113.10:33978and Peer B at198.51.100.20:48654. These are example addresses. - Peers exchange encrypted candidates through Signal.
- The clients test those candidates. A STUN response alone does not establish a tunnel.
STUN reports what it sees. ICE checks which candidate pairs actually work.
The relay carries encrypted packets
The laptop encrypts traffic with WireGuard. The relay forwards the ciphertext to the homelab, which decrypts it. The same end-to-end encryption applies in the reverse direction.
Two transports race
QUIC over UDP/443 and WebSocket over TCP/443. The first connection wins.
A separate fallback path
The native relay is separate from ICE. An ICE
relay candidate means legacy TURN.
A relay can change latency and throughput. It cannot decrypt the WireGuard payload.
Demo time
-
1
Connect the laptop and homelab
netbird up -
2
Inspect the actual path
netbird status -d -
3
Reach the service over its NetBird address
ssh <user>@<homelab-netbird-ip>
Watch the overlay IP, connection type, and WireGuard handshake.