Posted: Thu Feb 28, 2019 0:33 Post subject: OpenVPN breaks local dns
I set up a local dns resolver on a Raspberry Pi with Pihole and Unbound resolver. Everything works fine until I turn on my OpenVPN Client on my ddwrt router.
Once the OpenVPN Client is enabled, my local dns stops working.
Looking at Unbound's error says it can't bind port 53. After enabling OpenVPN Client, port 53 on the router is opened, breaking my dns.
This might just be a coincidence but I'm not sure.
My Pi's setup is correct and fully functional if OpenVPN Client is disabled then stops working once OpenVPN Client is enabled.
The Pihole, raspbian, and unbound community haven't been able to help me fix this.
All devices have been fully wiped and fresh reinstalls performed multiple times.
Could someone please help me get OpenVPN Client and local DNS (Pi, Pihole, and unbound) to work together?
R7000 with Kong PTB DD-WRT v3.0-r38580M kongac (02/05/19). _________________ R7000 - Kong PTB Test
Joined: 18 Mar 2014 Posts: 6362 Location: Netherlands
Posted: Fri Mar 01, 2019 13:12 Post subject:
When you enable OpenVPN client to a commercial provider they push their DNS servers and those are used.
You can stop the pushing of the DNS servers by adding the following to the Additional config of the OVPN client:
pull-filter ignore "dhcp-option DNS"
Or you can tell DNSMasq to ignore the DNS servers in resolv.dnsmasq with the settings of @grc
This would be my preferred method as there is a bug which can cause DNS leakage and this method will stop it