Help me configure mwan3 for Wireguard with dynamic IPs

This forum has been incredibly helpful! I want to thank all contributors that offer help and advice on all sorts of topics.

For the past month or so I have been on quite the journey to build a Wireguard-based infrastructure that has a single central server and two clients. All internet access goes via the central server and all clients and the server have access to the clients' LANs.

Overall everything works well. As part of my journey I figured out how to implement DDNS clients on the clients and use hostnames rather than static IPs. I also figured out how to use mwan3 to detect when the clients cannot connect to the server and switch routing internet access via the wan port rather than wg0.

Where I do need help as I can't figure it out is how to restart the tunnel when the server changes its IP address. It seems that mwan3, or at least the way I have configured it, does not handle re-resolving host names.

Any suggestions how to quickly and reliably have the clients re-resolve the IP address of the server will be greatly appreciated. The clients will be thousands of miles from the server and I seek a redundat/resilient solution that does not require human intervention.

TIA!

1 Like

WG protocol has no built-in support to re-resolve DDNS peers.
But it provides client side scripts to mitigate the problem:

1 Like

Thanks! Let's see how this works over the next few weeks.

1 Like