0
dig domain.com +short

returns public ip

dig @172.16.0.1 domain.com +short

returns server dns routed ip

I want to use the dns routed IP by default. Changing client adapter settings to use 172.16.0.1 as the default DNS server achieves the desired result but I want the new route to be selected by default using openvpn.

Server:

ifconfig-push 172.16.3.4 255.255.252.0
push "route 172.16.0.0 255.255.252.0 172.16.3.4"    
push "dhcp-option DNS 172.16.0.1"
push "dhcp-option DOMAIN domain.com"

client:

client
dev tun
proto tcp
remote a.a.a.a 80
resolv-retry infinite
nobind
dhcp-renew
register-dns
allow-pull-fqdn
script-security 2
persist-key
persist-tun

route-method exe
route-delay 5

Your Answer

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

Browse other questions tagged or ask your own question.