Is there any way to configure openvpn to "push" routes to a client for a given FQDN instead of an IP/mask?
I mean something that would do the same as the following (broken) line in openvpn.conf file.
push "route my.hostname.mydomain.com"
The host I want to setup the vpn against changes its IP quite often so I need to use its DNS name instead of the address. If there is another way of doing this or I am reinventing some wheel, please, let me know :)
Can this be done with openvpn? If so, how? If not, what other options do I have?
Thanks in advance.
the previous answer is wrong. download openvpn 2.1.3 and use --allow-pull-fqdn
HTH,
JJK
You can not route based on FQDN. Routing occurs at Layer 3 (IP) while DNS lookups occur at layer 7 (Application).
Your best bet would be to run your own DNS server internally on the VPN and push that as the DNS server for your clients. You can then adjust the IP from the DNS server or do it dynamically.