~kris/dots

srice

ref: e9b48d06a8541f3eda5c4db90382ab3c77183afb srice/doc/networking/hardware/vpn-appliances.md -rw-r--r-- 2.3 KiB
e9b48d06 — Kris Yotam xprofile: systemd-aware pipewire start + blueman-applet; sb-internet: tolerate missing /proc/net/wireless 2 months ago

#VPN Solutions

#Hardware Acceleration

#WireGuard vs IPsec

WireGuard wins for home lab:

  • 4,000 lines of code vs ~400,000 for IPsec
  • Faster, simpler, more auditable
  • ChaCha20-Poly1305, Curve25519, BLAKE2s, SipHash24, HKDF
  • "Opinionated" design prevents weak cipher selection

#WireGuard Hardening

  • Never reuse private keys across hosts
  • Add PreSharedKey per peer (post-quantum protection layer)
  • Restrict firewall to UDP 51820 only
  • Store private keys with 600 permissions
  • Rotate keys regularly
  • WireGuard does not hide traffic characteristics

Guides:

#IPsec/IKEv2 with strongSwan

Config: /etc/ipsec.conf and /etc/ipsec.secrets

  • Use ! suffix to prevent strongSwan appending defaults
  • Recommended ESP: aes256gcm128-prfsha256-ecp256
  • chmod 600 /etc/ipsec.secrets
  • Use X.509 certificates over PSK when possible

NSA guidance: DH group 16, AES-256, SHA-384 (CNSSP 15 compliant)

Guides:

#Hardware Recommendation

Intel N100 mini PC with OPNsense:

  • WireGuard at 900+ Mbps
  • Under $200 complete
  • No separate VPN appliance needed

Benchmarks:

#fwknop (Single Packet Authorization)

Strictly superior to port knocking. Single encrypted, HMAC-authenticated, non-replayable UDP packet authorizes access.

  • Service ports stay closed (default DROP) until SPA packet received
  • Invisible to Nmap
  • No IP address to attack
  • Supports iptables, firewalld, PF, ipfw
  • Clients: Linux, macOS, Windows, Android

For SSH: the single best protection tool available.