I've migrated to the following setup:
* A virtual machine in Linode cloud
* The VM runs wireguard and redirects traffic from the ports that I care about
* My server connects to Wireguard
The trick is to initial a connection from the server to the VM when a WG interface is up. As it's the server that is able to connect to the VM (not the other way round).
The solution I came up was to ping VM after a wg0 interface is up. I basically have this:
PostUp = ping X.Y.Z.Z -c 10
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!