OpenVPN site-to-site dynamic dns instead of an IP

Hi guys!

Is it possible to set a dynamic dns instead of an IP for the local-host?

set interfaces openvpn vtun1 local-host '198.51.100.10'

When I try, it doesn’t work.

Thank you

Hi @fegauthier,

The vyos command don’t allow this at the moment.

When you leave the option unse, OpenVPN will be bind on all interfaces. Some firewall rules can do the security part, if you want exclude other interfaces.

from OpenVPN manual

–local host

Local host name or IP address for bind. If specified, OpenVPN will bind to this address only. If unspecified, OpenVPN will bind to all interfaces.

so it is possible but the openvpn service must restart when you get a new IP address. Can you write a little bit more about the usecase?

Thanks I will try that.

The use case is to be able to communicate with my father’s network. We don’t have static IP from our ISP.