PiHole was working until I lost power--can't get it running properly now

Expected Behaviour:

PiHole functioning properly. Accessible via IP address/terminal. Dashboard updating regularly. Running:

  • Rpi 4 Model B
  • DietPi v8.7
  • Pi-Hole 5.11.4
  • Unbound

Actual Behaviour:

Doesn't seem to be doing anything. I have access to the admin panel but Pi Hole isn't blocking any queries. Not sure what happened after my power went out, but as soon as it came back on, the Pi Hole stopped functioning properly.

Debug Token:

Token

Your debug log shows your Pi-hole is successfully blocking queries.

 Sep  8 04:48:30 dnsmasq[442]: query[A] 03e.info from 127.0.0.1
 Sep  8 04:48:30 dnsmasq[442]: gravity blocked 03e.info is 0.0.0.0

Please run these commands from a client and post the output.

nslookup pi.hole
nslookup flurry.com
nslookup flurry.com 192.168.1.28

It was intermittently blocking queries, but not at the rate that it had been before. It was just a handful compared to hundreds when it was working properly.

Here is the output of the commands you asked me to run. I had to change 128 to 129 because the RPi stopped working so I unplugged it and it found another IP address when it restarted:

root@DietPi:~# nslookup pi.hole
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find pi.hole: NXDOMAIN
root@DietPi:~# nslookup flurry.com
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
Name: flurry.com
Address: 74.6.136.150
Name: flurry.com
Address: 212.82.100.150
Name: flurry.com
Address: 98.136.103.23

root@DietPi:~# nslookup flurry.com 192.168.1.29
Server: 192.168.1.29
Address: 192.168.1.29#53

Name: flurry.com
Address: 0.0.0.0
Name: flurry.com
Address: ::

Here's what my dashboard looks like currently.

It b looks like you run those commands from the Pi device itself. Please re-run them from a client.

I'm a very, very new person to RaspberryPi's and PiHole in general. How... do I run a command from a client?

Sorry this is probably the most basis question I could ask. I really just followed a setup guide for this whole them. Not entirely sure of anything outside of that guide.

If you use Windows you need to type those commands in the command line tool (terminal).
__

Background:
From the debug log I can see that your router is advertising it's own IP as DNS server to the clients via DHCP. This means all DNS queries go to the router instead of Pi-hole.

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 548 bytes from eth0:192.168.1.1
     Offered IP address: 192.168.1.29
     Server IP address: N/A
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.1
      lease-time: 86400 ( 1d )
      netmask: 255.255.255.0
      router: 192.168.1.1
      dns-server: 192.168.1.1
      --- end of options ---

Witht the nslookup commands we could verify this. But you could also go on and change the DHCP settings in your router to advertise Pi-hole's IP as DNS server. Just make sure that you disconnect your devices from your network after you made DHCP changes to pick up the new settings.

Ohhhhh okay. Sorry, I thought there was another command line for interacting directly with the RPi that I wasn't aware of. Here's what I get when I enter those into Command Prompt:

C:\WINDOWS\system32>nslookup pi.hole
Server: UnKnown
Address: 2601:8c:600:14f:a36:c9ff:fe8b:109d

*** UnKnown can't find pi.hole: Non-existent domain

C:\WINDOWS\system32>nslookup flurry.com
Server: UnKnown
Address: 2601:8c:600:14f:a36:c9ff:fe8b:109d

Non-authoritative answer:
Name: flurry.com
Addresses: 74.6.136.150
98.136.103.23
212.82.100.150

C:\WINDOWS\system32>nslookup flurry.com 192.168.1.25
Server: pi.hole
Address: 192.168.1.25

Name: flurry.com
Addresses: ::
0.0.0.0

This may be part of your solution but is there a way to keep a specific IP address open on my router so that DietPi/RPi doesn't continually switch to randomly new/different IPs every day? Does it matter if that happens or not?

Also, again, thank you so much for your help!

This device is not using Pi-hole for DNS. It is using the IPv6 DNS server shown, likely from your router.

This confirms that Pi-hole is working once the DNS queries are routed to it.

Yes. Set a static IP on the device, or reserve the IP in the router DHCP settings.

It matters. For clients to find Pi-hole, it needs an IP that does not change.

At this point, would it be easier to wipe everything and start from scratch?

Alright. So, I've tried using this guide to set a static IP and my RPi refuses to change. It's just currently stuck on 192.168.1.25.

Static IP issues aside, this is what I'm trying to fix:

This device is not using Pi-hole for DNS. It is using the IPv6 DNS server shown, likely from your router.

How do I get it to USE Pi-Hole for DNS?

Hey, still hoping you might be able to help me out! Thanks :slight_smile:

It depends on how your router handles it. You'll have to go into your router's settings and find if it will let you set custom DNS servers for the local LAN devices and change it there. These may be separate from DNS settings your router is using for its WAN connection.

worst case you can set the dns server manually per device and point them to your pihole if the router turns out to not allow custom dns server

Gotcha. So I have a Netgear Nighthawk R7000... would that be able to set a custom DNS?

A vast majority of routers allow this. The wifi I'm using is locked behind an app. and in that app, I then have to log in. I don't know anything about the account and it's isp equipment, not custom purchased.

Simce your getting into this, I like to let folks know that your smart devices will (like wifi-connected smart tv) will usually not let you change dns manually.

So, I have a tiny wifi usb that uses it, and, with windows, in two clicks, I have my own 15-20ft range network for these devices.

I think I'll add another wifi router and just use it in place. Gotta block that telemetry. When roku refuses to tell its customer base what information is collected, well you do the math!

You'd have to consult your owner's manual to be sure, but most likely there is a way to do this.

Nighthawk AC1900 Smart WiFi Router (netgear.com)

Okay, thank you everyone!

I seem to have gotten it working. I believe I must've been focusing on Pi-Hole instead of DietPi itself when I was trying to configure the static IP. I reinstalled almost everything and started from scratch, and specified the static IP I wanted from the beginning.

Hopefully this is the last time I run into this sort of issue, but I just wanna say thank you to everyone who replied because you guys helped me out a ton!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.