This explains how to self-host services from a home network that sits behind carrier-grade NAT (CGNAT), which blocks traditional router port forwarding by sharing a public IP across many customers. The solution is to run a cheap VPS as a public bridge and establish a bidirectional WireGuard tunnel initiated from the homelab to that bridge. That tunnel forwards all inbound ports from the VPS to the homelab while leaving the homelab-initiated traffic on the home router. The claimed benefits are end-to-end control of hardware and software, avoidance of cloud providers, and preserved client IP visibility because the bridge rewrites destinations but not sources. The setup adds about 39 ms RTT compared with a direct public IP, and a static ISP IP is noted as an alternative at roughly €20/month.
Technical specifics cover both endpoints: the bridge uses wg0 with Address=10.0.0.1/24, ListenPort=51820 and iptables rules that DNAT all non-exempt traffic to 10.0.0.2 while exempting UDP 51820 and TCP 2222; FORWARD rules accept the tunnel traffic. The homelab runs wg0 with Address=10.0.0.2/24, AllowedIPs=0.0.0.0/0, PersistentKeepalive=25 and policy-routing (ip route add default dev wg0 table 200; ip rule add from 10.0.0.2 table 200) so replies traverse the tunnel. Resilience strategies include a homelab cron that reboots if SSH fails, fallback access via Cloudflare Tunnel or Tailscale, and WireGuard’s rehandshake for short drops.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.