Skip to content

VPN

omfreebdy supports two VPN options: WireGuard (built into the FreeBSD kernel) and Tailscale (mesh VPN with zero-config networking). The vpn-setup helper handles installation and management for both.

vpn-setup is the unified entry point for VPN management. Run it with no arguments to see status of all configured VPNs.

# Show WireGuard + Tailscale status
vpn-setup status

Tailscale builds a mesh VPN on top of WireGuard. Every device on your Tailscale network gets a stable IP, and connections are peer-to-peer when possible. No port forwarding or config files required.

# Install via vpn-setup
vpn-setup tailscale install
# Or manually:
pkg install tailscale
sysrc tailscaled_enable=YES
service tailscaled start

After install, authenticate with your Tailscale account:

# Opens a browser link for authentication
vpn-setup tailscale up
# Or directly:
tailscale up
# Show connected peers
tailscale status
# Disconnect (keeps daemon running)
vpn-setup tailscale down
# Reconnect
vpn-setup tailscale up
  1. Installs the tailscale package via pkg
  2. Enables tailscaled at boot via sysrc
  3. Starts the tailscaled service

WireGuard runs as a kernel module (if_wg) on FreeBSD. It is fast, minimal, and uses short static config files.

# Install via vpn-setup
vpn-setup wireguard install
# Or manually:
pkg install wireguard-tools wireguard-kmod
kldload if_wg
sysrc kld_list+=" if_wg"

WireGuard configs live in /usr/local/etc/wireguard/. Copy your config file (from your VPN provider, self-hosted server, or wg genkey setup) into place:

sudo cp your-config.conf /usr/local/etc/wireguard/wg0.conf

A minimal wg0.conf looks like:

[Interface]
PrivateKey = <your-private-key>
Address = 10.0.0.2/24
[Peer]
PublicKey = <server-public-key>
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0
# Bring up the tunnel
vpn-setup wireguard up wg0
# Tear down the tunnel
vpn-setup wireguard down wg0
# Check tunnel status
vpn-setup wireguard status

Tailscale daemon not running

service tailscaled status
# If stopped:
service tailscaled start

WireGuard kernel module not loaded

kldstat | grep if_wg
# If missing:
sudo kldload if_wg

Ensure kld_list in /etc/rc.conf includes if_wg so it loads at boot.

No connectivity after WireGuard up

Check that your config has the correct Endpoint, keys, and AllowedIPs. Verify with sudo wg show wg0.

Tailscale can’t reach peers

Run tailscale ping <peer-ip> to diagnose. If using a firewall, ensure UDP port 41641 is open for direct connections. Tailscale falls back to relay (DERP) servers if direct connections fail, so connectivity should still work — just slower.