How to ensure OpenVPN connection uses specific DNS?

Solution 1:

try adding:

# put actual dns name here
dhcp-option DNS 10.11.12.13

to your client's config

Solution 2:

If you (unlike the OP) have access to the OpenVPN server configuration, you can add this option in your OpenVPN server.conf if you want to push for all the clients:

push "dhcp-option DNS 8.8.8.8"

You can change the 8.8.8.8 to your desired DNS.


Solution 3:

add this to client config file:

#ipv4
pull-filter ignore "dhcp-option DNS"
#ipv6
pull-filter ignore "dhcp-option DNS6"