NetBird

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

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.

NetBirdNC State Linux Users’ Group · October 16, 2026

Two machines behind NAT

I want to SSH from my laptop to my homelab.

A laptop on campus and a homelab at home are both behind NAT. Laptop Campus Wi-Fi Homelab Home network No incoming connection Both behind NAT

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.

NetBirdNC State Linux Users’ Group · October 16, 2026

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.

NetBirdNC State Linux Users’ Group · October 16, 2026

How the peers connect

Management registers peers. STUN discovers public addresses. Signal exchanges candidates. WireGuard carries encrypted traffic. Laptop NetBird client Homelab NetBird client Management Keys, policy, addresses STUN Public IP:port Signal Trade candidates Discover and exchange possible paths Encrypted WireGuard traffic Direct if possible. Relay if needed.
  1. Register: clients send public keys to Management, which provides addresses and policy.
  2. Find a path: STUN discovers public addresses. Signal exchanges encrypted candidates.
  3. Connect: WireGuard carries traffic directly when possible, or through a relay.
  1. 1. RegisterSign in. Get the network map.
  2. 2. Find a pathDiscover addresses. Test candidates.
  3. 3. ConnectSend encrypted traffic.
NetBirdNC State Linux Users’ Group · October 16, 2026

Management distributes trust

Both peers keep private keys locally, send public keys to Management, and receive their network map and policy. Management Network map and policy Laptop Private key stays here Homelab Private key stays here Public key Map + policy Both peers register and receive updates

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.

NetBirdNC State Linux Users’ Group · October 16, 2026

Discover an address, then test it

Both peers discover their public IP and port through STUN and exchange candidates through Signal. Laptop Peer A Homelab Peer B STUN Observed address 203.0.113.10:33978 198.51.100.20:48654 Signal Encrypted exchange Example addresses. The clients still have to test the path.
  1. STUN observes Peer A at 203.0.113.10:33978 and Peer B at 198.51.100.20:48654. These are example addresses.
  2. Peers exchange encrypted candidates through Signal.
  3. 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.

NetBirdNC State Linux Users’ Group · October 16, 2026

The relay carries encrypted packets

A relay forwards encrypted WireGuard packets between the two peers when the direct path is unavailable. Laptop WireGuard encrypts Homelab WireGuard decrypts NetBird relay Forwards ciphertext Direct path unavailable WireGuard stays encrypted between the peers

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.

NetBirdNC State Linux Users’ Group · October 16, 2026

Demo time

  1. 1
    Connect the laptop and homelabnetbird up
  2. 2
    Inspect the actual pathnetbird status -d
  3. 3
    Reach the service over its NetBird addressssh <user>@<homelab-netbird-ip>

Watch the overlay IP, connection type, and WireGuard handshake.

NetBirdNC State Linux Users’ Group · October 16, 2026

Presentation controls

Right arrow, Space, or Page Down
Next step or slide. The architecture builds in three steps.
Left arrow or Page Up
Previous step or slide.
Home / End
First / last slide.
N / F
Show notes / toggle fullscreen.

Click the right side of a slide to advance, or the left third to go back. Links and controls work normally.

Read shows all slides with expandable notes and sources. Phones open in reading view automatically. Use your browser’s Print command to save all slides as a PDF.

Notes appear on this screen. A mirrored projector will show them too.