DNS not changing after OpenVPN connection starts

@alzhao

 

I think we just need to figure out how to get the openvpn client on this device to accept the pushed DNS server. It doesn’t matter whether that’s an internal (to the VPN) or even external, public DNS server. All we need is the client to accept and respect the pushed DNS option until the tunnel is dropped.

It seems to be how most of the OpenVPN clients work - on Windows, Android etc, the push options get applied. I have another OpenWRT router with OpenVPN installed, I’ll check to see if it respects the push dns settings and report back. So we can rule out if it’s an implementation issue here, or some issue native to openwrt.

My reason for wanting to accept the push dns is that I need internal to the network hosts translated. My use case here is for connecting back to my office when I’m on the road. So I need to be able to access my internal network’s devices without having to remember IP addresses.

1 Like

I have openVPN server running on a Ubuntu 16.04 rig. I set it up according to this tutorial:

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04

I am able to connect to it just fine with my AR300M-Lite however the DNS isn’t working. I made the following modifications to the server side per instructions above:

push "redirect-gateway def1 bypass-dhcp block-local" #added the Block-Local

push “dhcp-option DNS 10.8.0.1”


I made the following client side changes for my AR300M (commented out these lines):

;user nobody

;group nogroup


I un-commented these lines and I verified the “dns_updown_script.sh” is in my latest firmware on the AR300M (2.261).

script-security 2

up /usr/bin/dns_updown_script.sh

down /usr/bin/dns_updown_script.sh


However, when I do the following (cat /tmp/resolv.conf.auto) :

# Interface wwan

nameserver 8.8.8.8

nameserver 8.8.4.4

 

nslookup google.com

Server: 127.0.0.1

Address 1: 127.0.0.1 localhost


The server side log shows:

someuser/someIP:56785 SENT CONTROL [someuser]: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp block-local,dhcp-option DNS 10.8.0.1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Any suggestions? What did I miss?

Hello,

any update on this topic?

The DNS update still does not work with firmware 2.27

1 Like

try below procedure