Is there a way to get wireguard running on vyos with a dynamic IP / DNS endpoint?
I have a working openvpn setup with a dynamic IP by setting remote-host to a hostname kept up to date with dynamic dns updates, but want to switch to wireguard.
As far as I can tell, the wireguard setup in vyos only accepts ip addresses under the peer setting. Is this correct?
vyos@vyos# set interfaces wireguard wg0 peer peer0 address foo.bar
Invalid value
Value validation failed
Set failed
Curious if anybody can help me get this configuration working.Thanks
This works as long as one end is static.
Then on the static site you omit the address/port config.
On the dynamic site you set a persistent-keepalive to keep the static site up2date with your current dynamic ip.
It’s an upstream issue, in fact wireguard don’t support mechanism of dynamic addresses by itself.
Of course you/we can use any workaround with cron/script/custom_daemon_checker
And it will work up to some point.
But it is not a production solution.
If you have any ideas or suggestions, we are always happy to discuss it.
Maybe together we will find the right solution for the implementation.
Having a cron job to periodically resolve the domain name is a perfectly good solution - I’ve been using that approach on edgeos for years without any problems . Having something like this in crontab for each tunnel solves my problem: