Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 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

HTH,

JJK

share|improve this answer

Your Answer

 
discard

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.