~kris/dots

srice

ref: 2582f0c4173a4ad6a31e0cb759473c893cdc4e93 srice/doc/networking/hardware/vpn-appliances.md -rw-r--r-- 2.3 KiB
2582f0c4 — Kris Yotam sb-cpu: portable temp source (Intel Core 0, AMD Tdie/Tctl, Asahi NVMe Composite fallback) 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.