Seems like this is a perfect opportunity to throw out all that custom jiggery pokery and just replace it with tailscale/wireguard.
Tailscale is this on easy mode, of course. There's a blog post by apenwarr somewhere that I can't find right now that lays out the fundamental thesis of Tailscale and its very similar to these folks' manifesto.