-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Software | WireGuard + Pi-hole #3007
Comments
@johnnyt83 Only idea is that the app is able to use an alternative DNS server, if the WireGuard configured one fails, which is not optimal, but I guess possible. But the DNS requests should still be tunnelled, which is definitely forced by the WireGuard app when configure so (0.0.0.0/0, ::0). Another question:
Next I remember you had the Pi-hole DHCP server enabled, while having a router that already serves as DHCP server.
|
Further research that actually prove what the default behaviour should be (as is on DietPi):
Still no idea why on Raspbian this is not required. Perhaps some RPi network setup that I did not yet find, loops requests from And now I have an idea:
|
Hi Guys, I'm using PiHole + WireGuard as well. To have DNS working on my mobile devices while using WireGuard, I switched on
Within PiHole log, I see request from localhost only. No other request from other devices. It seems PiHole is not accepting request from interface
I don’t know why but a trigger is needed to get PiHole listing on all interfaces after reboot ☹ |
@Joulinar
|
@MichaIng I did as you suggested. I rebooted my RPi and I could resolve DNS queries on the Pi itself but not from other clients in my LAN. I executed the following steps:
To check the interface I installed Traffic from Win Client to PRi after reboot
Traffic on the RPi itself
And finally after accessing PiHole Admin Interface
What I noticed as well, the RPi is using 127.0.0.1 to resolve his own DNS requests. Means the Seems like an issue on PiHole as it's not picking up request on port 53 on all interfaces. I opened a ticket with PiHole pi-hole/pi-hole#2898 |
@Joulinar
That is expected, otherwise Pi-hole ads blocking would not be done for the RPi itself. Pi-hole is an own DNS provider (the |
Based @Joulinar's last comment, this is not the case. The device does not receive any requests until something is triggered by opening the web interface. Once that trigger occurs, the requests are able to go through. Pi-hole is not ignoring any requests, the requests are being stopped by some network function. The only way I can see this trigger happening is if the system is misconfigured in such a way as to trigger this line: The web interface gets the status by calling However, the misconfiguration would have been fixed by calling |
@Mcat12 @Joulinar
If indeed the port 53 requests do not reach the Pi, then I am wondering why port 80 requests (web interface) do? The only difference I can imagine is UDP vs TCP.
If the file system resets itself, then this should be visible by other issues. However easy to test. Run and paste the following once when DNS resolving does not work (yet), once after accessing the web UI, once after another reboot:
That covers all possible relation with config and And just another hint, since this topic initially was about using Pi-hole through a WireGuard VPN connection, as of the request interfaces and IPs, this is all outside of any VPN client, so not related to WireGuard. |
just to avoid any confusion, The whole capturing was done on my RPi.
For me the picture looks like, my client I did some more investigation on the topic. If I'm switching PiHole configuration from Interesting point: If I'm running |
Okay, so I got it right 👍. But just to sort it out, could you paste
That is actually an interesting point and the way where Pi-hole indeed can/does ignore requests.
As of above, Pi-hole has a mechanism to ignore requests based on conditions. And thanks to @Joulinar testing we are coming closer to which condition seems to fail until a web access is done. Probably Pi-hole is not identifying the client as a local network one? I guess it can be hard to replicate since most likely it depends on the particular network setup, but I will run some test here as well with different network conditions (hosts entries, DHCP and things like that). We can do that more targeted with some details about how Pi-hole/dnsmasq does this check. From the code: https://github.com/pi-hole/pi-hole/blob/development/advanced/Scripts/webpage.sh#L200
What I see now, is that there is one DNS query related dnsmasq setting left: https://github.com/pi-hole/pi-hole/blob/development/advanced/Scripts/webpage.sh#L191-L193
Testing scheduleAssure that any conflicting dnsmasq setting is removed and re-add
|
@MichaIng below the output of
but it did not changed, once PiHole is working again. Pls let me know if I should do some further testing. |
@Joulinar Further testing can be done as of "Testing schedule" above. |
I did the tests as described above. Below you can find the results: Test 1
Test 2
Test 3
Test 4
For me looks like the issue is with the PiHole setting |
@Joulinar
Okay so it seems that the remaining
Jep, in combination with most likely too early service start on boot.
|
Seems eth0 is started way after PiHole on my RPi
But the log looks similar if I switch to |
@Joulinar I am just wondering why this is the case since our installer explicitely adds $network to the pihole-FTL sysvinit services start requirement and replaces $syslog with this since it caused issues at least in the past when rsyslog was not installed. Probably dhcpcd or wpa_supplicant services cause the networking service to be out of order. To things you can test:
Then reboot and see if the order is different. |
@MichaIng first of all, many thanks for still looking into this. But unfortunetaly it dosn't change anything :/ Anyway I'm now using |
@Joulinar
I just checked, at least on Debian Buster, the $network dependency is interpreted/translated by the systemd generator into
In your case this does not seem to be the case, or some dependency/ordering failed and messed it up.
|
@MichaIng I See you put a lot of investigation on it. Not sure if it's still needed but below the output of
|
@Joulinar
Client
Pi-hole server
Client after accessing web UI, even without login:
@Mcat12 Issue up: pi-hole/pi-hole#2924 |
To allow DNS request though WireGuard, Pi-hole needs to be configured to allow DNS requests from all interfaces (option 1 on settings > DNS).
Somehow on raw Raspbian this is not required, with otherwise identical WireGuard + Pi-hole settings, which is actually strange since wg0 != eth0/wlan0.
Thanks to @johnnyt83 for the testing session to point this out.
/etc/network/interfaces
)pihole -a -i all
pihole -a -i wg0
work as well? Nope!pihole -a -i local
to not allow any requests from www. Although the VPNs task here is exactly to allow requests without opening port 53 to www, so it doesn't matter that much 😉.The text was updated successfully, but these errors were encountered: