pivpn: [BUG] PiVPN breaks pihole when choosing to use pihole in the install script
In raising this issue, I confirm the following:
{please fill the checkboxes, e.g: [X]}
- I have read and understood the contributors guide.
- The issue I am reporting can be replicated.
- The issue I am reporting can be is directly related to the pivpn installer script.
- The issue I am reporting isn’t a duplicate (see FAQs, closed issues, and open issues).
Describe the bug PiVPN breaks pihole when choosing to use pihole for dns after pihole is detected.
It appears the problem is due to the file /etc/dnsmasq.d/02-pivpn.conf This file had this one line in it: interface=wg0 removing this file and restarting pihole fixed it for me.
To Reproduce Steps to reproduce the behavior:
- have a running pihole server
- install PiVPN and chose yes after pihole is detected
- observe that pihole is broken
Expected behavior I expected pihole not to be broken
Screenshots n/a
Additional context This reddit thread got me at least understanding what triggered the error, then I just went searching around in /etc until I found something related, and that file was it.
https://www.reddit.com/r/pivpn/comments/ess90x/pivpn_kills_pihole/
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (12 by maintainers)
I can confirm it work well now with my setup. Thank you @orazioedoardo
Done: https://github.com/pivpn/pivpn/commit/87cf243abca687b680849de0fbead48c6b6e325d. Now if you have “Listen on all interfaces” the script won’t add the line
interface=[...].That’s the lazy approach most Pi-hole + anything VPN guides suggest to do: just listen on every interface instead of what you specifically tell Pi-hole to listen on, and I bet most of those “breaks” arise from this, reading outdated guides.
That’s also a lazy approach to me, why not just change the interface in the /etc/dnsmsq.d folder? (however I respect that use case, lazy but easy for non tech savvy). Even though you should also update the static DHCP settings inside /etc/dhcpcd.conf if you switch from ethernet to wifi…