Using the Raspberry as DNS Server for my router, it should block ads for all devices in this network.
Actual Behaviour:
On first installation it worked fine. After a reboot of my Raspberry, it doesn't work anymore. The router uses another DNS, even though I've set both the primary and secondary to my Raspberry IP. If I try to use my Raspberry as DNS directly with my PC, I can't reach any websites anymore.
pihole status shows DNS service is running and Pi-hole blocking is Enabled.
pihole -v shows Pi-hole v4.3.2, AdminLTE v4.3.2 and FTL v4.3.1 (All latest)
I tried nslookup pi.hole from my computer: "Non-existent domain.". I tried with my normal Raspberry IP and that works.
Trying it on flurry.com works from my computer, but on my raspberry i get 0.0.0.0 as address.
And for the stats command, i get a "stats´: Permission denied."
(Also tried with sudo, still "Permission denied.")
Also, i should've added this at the beginning maybe. I did not install lighttpd at the installer, because I'm already using apache and I'm using a custom webserver path. I only got access to the admin panel after copying the files over from the /var/www/html to my custom path. I'm not sure if that's got something to do with it maybe...
Your debug log shows that Pi-Hole is working properly and processing DNS queries. The problem likely lies in the router configuration.
From a client that you believe should be connected to the Pi-Hole for DNS, from the command prompt or terminal on that client (and not via ssh or Putty to the Pi), what is the output of
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.178.46
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
(Had to translate the output. Hope it's all correct)
EDIT: Oh yeah i also wanna add, when i have Pi Hole installed, my /etc/rc.local won't run on reboot anymore. If i uninstall Pi Hole it starts working again.
I did everything according to the setup tutorial. It remains exactly the same as before. Ads not being blocked, and directly using the Pi Hole as DNS for my PC doesn't let me open any websites, because they don't exist.
The one you mentioned. Also I just had to undo every setting i made for Pi Hole inside my router settings, because my whole internet was gone and i couldn't even reach my router anymore. And no, I did not do anything wrong. I did the exact things that were mentioned in the tutorial.
I'm pretty sure, for now the most important part is not that something's wrong with my router. The most important part is, that I can't even access any website if I try to use my Pi Hole directly as DNS Server for my PC. Without that working, I don't think it will even if the router is working as it should.
I didn't mention a tutorial.
I've provided a link to a post that contains a variety of possible configurations.
If you did use Gert_Chlupaty's settings, you quite likely haven't applied them correctly:
This shows you are using your FB as local DNS-Server.
This shows that your FritzBox has resolved flurry.com, which would have been blocked had you set up Pi-hole as your FB's upstream DNS server.
Gert_Chlupaty's settings do not require to set Pi-hole as upstream DNS server for your FB, but they rely on setting up Pi-hole als local DNS server correctly.
The output of your commands implies that currently your FB is not using Pi.hole at all.
If had to guess:
This might be caused by a missing or incorrect setting of your local DNS server under Heimnetz| Netzwerk | Netzwerkeinstellungen | IPv4-Adressen in your FB.
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.178.46
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** ZeitĂĽberschreitung bei Anforderung an UnKnown.
Your FritzBox should be always available via its IP, either 192.168.178.1 by default or its emergeny IP169.254.1.1 in an otherwise completely unconfigured network, even if name resolution for fritz.box may fails.
That shows that 192.168.178.46 is not responding to DNS requests.
Is Pi-hole running? Is your Pi-hole machine residing at that address? Do you see the flurry.com DNS queries listed in Pi-hole's Query Log?
My Pi Hole is running and yes that's the IP of it. It also says in the Admin Interface "Pi-hole IPv4 address: 192.168.178.46/24". I can normally ping the IP aswell from my Computer. And I do not see the query listed.
That information may not be accurate, as it is populated from Pi-hole's default settings as defined during its installation (setupVars.conf). And ping just verifies that some device is residing at that address.
So we better verify this:
Does your FritzBox show your RPi using this .46 address?
Alternatively, if you run ip addr on your RPi, does that produce a matching address?
Also, when run from your Pi-hole machine, what's the output of: