WireGuard service exposure script
A script run on a host alongside WireGuard that works like wg-quick: it parses a WireGuard config file, handles the routing behind the scenes, and returns a cleaned-up config to pass to wg. The goal is a one-liner setup on a server with a public IP that exposes internal web services (e.g. localhost:3000) to the public Internet via a custom domain (e.g. app.example.com), while restricting access to WireGuard peers and respecting internal VPN routing rules based on AllowedIPs. Ideally, WireGuard configs could be generated by other tools or services and automatically fetched and applied to the running wg interface.
What it addresses
Exposing an internal web service (e.g. localhost:3000) to the public Internet has many possible setups; the author is seeking the simplest one that lets only WireGuard peers access the local service and respects internal VPN routing.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
WireGuard service exposure script
A script run on a host alongside WireGuard that works like wg-quick: it parses a WireGuard config file, handles the routing behind the scenes, and returns a cleaned-up config to pass to wg. The goal is a one-liner setup on a server with a public IP that exposes internal web services (e.g. localhost:3000) to the public Internet via a custom domain (e.g. app.example.com), while restricting access to WireGuard peers and respecting internal VPN routing rules based on AllowedIPs. Ideally, WireGuard configs could be generated by other tools or services and automatically fetched and applied to the running wg interface.
Problem: Exposing an internal web service (e.g. localhost:3000) to the public Internet has many possible setups; the author is seeking the simplest one that lets only WireGuard peers access the local service and respects internal VPN routing.
Posted by @rudasn · Original source ↗
Source text · @rudasn · · Source ↗
At the moment I'm settling on having a simple script that I can run on a host alongside wireguard. The script will function like `wg-quick`, parsing a wireguard config file and handilng the routing stuff behind the scenes, and returning a cleaned up config to be passed to `wg`.