6

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.

2 Answers 2

9

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

HTH,

JJK

2
  • Can you please explain what those acronyms mean?
    – jackdh
    Apr 18, 2017 at 21:00
  • @jackdh fqdn = fully qualified domain name = full domain name.
    – davidgo
    Mar 4, 2019 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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .