Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"

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.

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
Thanks for the answer. I will try a DNS related solution – Francisco Oct 5 '10 at 14:30

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



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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