I have a few different yunohost servers in different locations, behind routers. I would like to have one cloud VPS which acts as a gateway, to route traffic to these different yunohost servers.
I would like to do this in such a way that:
- I don’t have to make any modifications to the routers (no router port forwarding)
- requests for different domains route to different servers (so I can’t use iptables or anything that operates beneath layer 7)
- UDP forwarding is supported (one of the ynh servers is running peertube, which requires udp)
- https certificate renewal is handled as seamlessly as possible
it seems like the best way to achieve this is with a reverse proxy, like caddy, nginx or socat, which forwards traffic by domain to a virtual IP address of the correct server, as provided by Zerotier, Tailscale or a VPN.
caddy handles https automatically.
nginx can forward udp via streams. socat can also forward udp.
so maybe the best way would be to run caddy and nginx on the vps to do the forwarding. and use zerotier or wireguard to make tunnels from the server to the vps?
is there a different or recommended way to do this?
are there any graphical applications that could be installed on the VPS to handle configuring of the routing without going in to terminal to manually modify configs?
are there any hosted services that offer forwarding like this?
I also see that it’s possible to use an OpenVPN access server to forward all the traffic (like in this video), but its my understanding this could only be used to route all the traffic to the VPS to one server, not to route traffic to different domains to different servers from the same VPS?
I also could run yunohost on the VPS, and then use the Reverse Proxy app for each domain being forwarded, and forward the traffic to the tunneled IP address, but I guess this does not support UDP?
__
this setup also has the added benefit of hiding the IP addresses of the local servers