5

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.

8

the previous answer is wrong. download openvpn 2.1.3 and use --allow-pull-fqdn

HTH,

JJK

  • Can you please explain what those acronyms mean? – jackdh Apr 18 '17 at 21:00
  • @jackdh fqdn = fully qualified domain name = full domain name. – davidgo Mar 4 '19 at 21:43
0

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.

  • Thanks for the answer. I will try a DNS related solution – scetoaux Oct 5 '10 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.