Serving a home server through an Internet server via Wireguard

Fri May 05 2023 00:00:00 GMT+0000 (Coordinated Universal Time)

Note, this is experimental. But seems to work.

A common way of serving data from a home server on the Internet is to punch a hole through the NAT server that hides the home network, and then dynamically update the IP number of the home server, behind an address, something like myhomenetwork.example.com . But that exposes the home server to the Internet and to any client.

But couldn't you use a VPN instead? The idea being that an Internet server has a Wireguard server, and the home server connects to it as a client. This should mean that it does not matter if the home server changes IP. Wireguard will handle that behind the scenes.

It seems to work. We may normally think of a VPN as the possibility for a client to reach servers on a protected network, but the Wireshark server (and I guess the entire network) can also see the ports of the connecting client.

One thing to think of is that the services on the home server must listen on the Wireguard interface.

I've tested the setup and it worked. I used an nginx proxy on the Internet server, that then connected to the IP number of the home server on the VPN Network. On the home server there was then an application server running, listening on the Wireguard interface.