Pi-hole not working properly

Expected Behaviour:

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)

Debug Token:


@Zythoxic Welcome to the Pi-hole Community!

First see if the client can “see” the Pi-hole:
From a network client, not the Pi-hole: nslookup pi.hole

Next check to see if Pi-hole can block a “known bad” site: nslookup flurry.com

Finally, let’s check Grarvity’s stats:
At the Pi-hole: nc localhost 4711 <<< $’>stats’


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 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…

Hope that helps somehow!

Let’s double-check your Pi-hole’s installation status. Please post the results of the following command from the Pi-hole:
cat /etc/pihole/install.log

Also, please provide the output for:
cat /etc/pihole/setupVars.conf

Run this command - the previous link had a bad command:

echo ">stats" | nc localhost 4711


domains_being_blocked 114458
dns_queries_today 1416
ads_blocked_today 220
ads_percentage_today 15.536723
unique_domains 233
queries_forwarded 1011
queries_cached 185
clients_ever_seen 4
unique_clients 4
dns_queries_all_types 1416
reply_NODATA 13
reply_NXDOMAIN 5
reply_CNAME 0
reply_IP 67
privacy_level 0
status enabled

For the first one

[✓] Creating user 'pihole'
  [✓] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [✓] No dnsmasq.conf found... restoring default dnsmasq.conf...
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [✓] Creating directory for blocking page, and copying files
  [✗] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [✓] Installing sudoer file

  [✓] Installing latest Cron script

  [✓] Installing latest logrotate script
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old

  [✓] Installing new IPTables firewall rulesets
  [✓] man pages installed and database updated

and for the second one


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

nslookup pi.hole

DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown

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.

This is from my PC which should be connected.

What is the output of this command from the PC command prompt:

ipconfig /all


   Hostname  . . . . . . . . . . . . : DESKTOP-83V1AHB
   Primary DNS-Suffix . . . . . . . :
   Note type. . . . . . . . . . . . : Hybrid
   IP-Routing activated. . . . . . : No
   WINS-Proxy activated. . . . . . : No
   DNS-Suffixsearchlist.. . . . . . . : fritz.box

Ethernet-Adapter Ethernet:

   Connection specific DNS-Suffix: fritz.box
   Description. . . . . . . . . . . : Intel(R) Ethernet Connection (2) I219-V
   Physical address . . . . . . . . : 04-D4-C4-57-3C-E5
   DHCP activated. . . . . . . . . . : Yes
   Autoconfiguration activated. . . . : Yes
   IPv4-Address  . . . . . . . . . . :
   Subnet mask  . . . . . . . . . . :
   Lease received. . . . . . . . . . : Saturday, 11. January 2020 13:41:40
   Lease expires. . . . . . . . . . : Tuesday, 21. January 2020 16:44:56
   Standardgateway . . . . . . . . . : (My router which uses the Raspberry as DNS)
   DHCP-Server . . . . . . . . . . . :
   DNS-Server  . . . . . . . . . . . :
   NetBIOS via TCP/IP . . . . . . . : Activated

(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.

It would recommend you revisit your FritzBox configuration.

There is definitively more than one way to correctly configure it.
Pi-Hole und FritzBox Setup Anleitung has quite a few configuration examples, some of them even quite recent.

Also, it’s in German, which might better suit you, as you run a FritzBox and mentioned translation :wink:

Ich würde empfehlen, Deine Fritzbox-Konfiguration noch einmal zu überdenken und ggf. anzupassen.

Es gibt hierfür sicherlich mehr als eine richtige Konfiguration.
Pi-Hole und FritzBox Setup Anleitung enthält einige halbwegs aktuelle Konfigurationsbeispiele.

Das ist außerdem auf Deutsch, was Dir vielleicht entgegenkommt, wo Du doch eine FritzBox fährst und auch schon von Übersetzung geschrieben hast :wink:

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.

Which tutorial?

On a Windows machine that is not blocking ads, what’s the exact output of:

ipconfig /all | find /i "server"


nslookup flurry.com

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.

As for the commands:

DHCP-Server . . . . . . . . . . . :
DNS-Server  . . . . . . . . . . . :


Server:  fritz.box

Non-authoritative response:
Name:    flurry.com

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.

What IP address did you enter there?

Exactly. Because as I said, my whole Internet stopped working when i used my Pi Hole as DNS Server. That’s why i had to reset everything…

I entered my Pi Hole address in the Local DNS-Server settings before. Which is

EDIT: Not that It’s interesting. But if you want to know, i used the commands again with Pi Hole as DNS Server.

   DHCP-Server . . . . . . . . . . . :
   DNS-Server  . . . . . . . . . . . :
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown

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 by default or its emergeny IP in an otherwise completely unconfigured network, even if name resolution for fritz.box may fails.

That shows that 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?

Yeah I had to use the emergency IP to reach it.

My Pi Hole is running and yes that’s the IP of it. It also says in the Admin Interface “Pi-hole IPv4 address:”. 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:

pihole status


grep "server=" --include=\*.conf -rn /etc/dnsmasq.d/

And finally: Does your RPi provide both WLAN and Ethernet connectivity?

ip addr shows me the same IP and I’ve also checked in the router before and I’m running a webserver on it aswell.

pi@raspberrypi:~ $ pihole status
  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled
pi@raspberrypi:~ $ grep "server=" --include=\*.conf -rn /etc/dnsmasq.d/

I have my Raspberry connected via WLAN. I can’t use LAN for it at the current place.