Can not push/pull DNS server from openVPN server

Hi forum

I am running a VPN server on pfSense where I am also resolving DNS.
I have set up an OpenVPN client on an OpenWRT travel router to access my home network via a VPN client.

My problem is that I can not force clients to use my DNS server via the openVPN client or server conf.

I have set push "dhcp-option DNS x.x.x.x" in the server config and dhcp-option DNS x.x.x.x in the client.conf, unfortunately this did not have any effect...

If I connect to my OpenVPN server with my mobile (iOS app) the DNS server is correct.
It is just not working with the OpenWRT device.

I would appreciate any ideas.

DNS doesn't quite work the same way with OpenWrt as it would on a device like a phone.

It really need to be set in dnsmasq, but this doesn't happen via the push/pull methods described.

The thread below is old and related to Wireguard, but the point is similar insofar as the DNS construct for VPNs under OpenWrt.

You can use the up/down scripts to help set/unset the desired DNS.

1 Like

I use up and down scripts for OpenVPN to deal with pushed DNS servers see:


Thank you @psherman and @egc using the up and down script solved it :grinning:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.