Pi-hole

601 readers
1 users here now

The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software.

founded 2 years ago
MODERATORS
1
2
 
 

Lately my home internet service has been experiencing brief periods of failure and I'm trying to understand what the root problem is and if there's anything I can do to fix it.

I have two piholes running on my home network providing DNS service and blocking. Lately I've been encountering brief internet outages, approximately once a day for the last week. Work laptop disconnects from VPN saying no internet and other devices show no internet either. Cable modem doesn't show it's lost connection though, and logging into my router it shows it has internet connectivity. Trying to ping a website shows the dns resolution isn't working. I can ping by IP address but not name. The outage usually resolves itself in approx 5 minutes, sometimes a little longer.

My piholes are setup to use Google, Cloudflare and Open DNS for dns service so I'm puzzled how my dns resolution suddenly starts failing. In theory if one's down, it'll use the others right? So how am I experiencing a dns outage? Is this a problem with something outside my network or something internal, or is there anything else I should do to diagnose and fix it?

3
 
 

I shifted homes and my new place comes with a connection that is ONT.

The router unit is a Phyhome P20 ONT. I don't have the option to assign static IP to devices, nor set another device as a DHCP server.

Is it possible to run a pihole effectively in such a setup? I honestly wanted to install OpenWRT, but I understand that it isn't possible with ONT style setups.

4
 
 

I'm trying to figure out how to set up Pi-hole for the first time and I think I'm doing something wrong, or missing some important step(s).

I figured that using Docker would be the easiest way to get it running so I started with the sample yaml I found on the pi-hole/docker-pi-hole github page. Then I went to my router's DHCP settings and set the primary DNS to the host's IP (I'm not sure if that's the correct one to use though*).

screenshotMy router's DHCP settings

Eventually I was able to confirm that a site I blocked was blocked when visiting it from the host PC, but my phone and other devices on my network could still visit the site.

Then I tried copying the same IP to the secondary DNS, but then I could no longer access the internet on other devices.

I also tried disabling the router's DHCP server to use Pi-hole instead. I used the same default gateway IP I found in the router's settings, but I lost internet on the other devices with that as well.

I know very little about configuring network stuff so I'm not sure what I might've done wrong.

*I also tried using the IP address I found in the Pi-hole's system information section as the primary DNS, but then the site I blacklisted was no longer getting blocked on the host machine.

5
 
 

Hi everyone!
I am a newish user. Installed pihole on my Pi 3B almost 3 months ago and since then I have had issues when playing games - notably CS2.
When I route my traffic thru Pihole I experience a significant increase in latency and jitter. It varies from noticable to insufferable. DHCP is turned on only on the router. Pi handles just then DNS and filtering.
If I disable Pihole and change the DNS to 1.1.1.1, there is almost no jitter and the latency is fine.
I've scowered the internet for answers, but most people blame having DHCP on both router and Pi, which I don't have enabled. Any ideas what I could check or change? Some even suggested enabling IPv6 support, but that didn't do anything.
The Pi is updated to the lates Pihole version as of today. It is enclosed in a plastic case and cooling, so temps aren't an issue.
On my PC I am running Fedora 42 with CachyOS kernel.
Thanks!

6
 
 

I have a pihole server on my network. It used to block the ads on my roku's homescreen and only empty placeholders would show up.

I bought a new Roku player and it doesn't seem to have any of the ads on the homescreen blocked by the pihole. Configuring the "secret menus" doesn't really do anything, as far as I can tell.

Does anyone have any updated methods for blocking ads on the Roku homescreen?

7
8
 
 

I want to set up pi-hole on a raspberry pi device of some sort and I'm having a hard time figuring out where to start with the hardware. I'm running skynet and diversion on Merlin right now for myself, but I want to put together a cheap plug and play box for non-technical family members, aside from repointing the router dns which I will do for them.

I think all I need would be the board (pi5 4gb?), power supply, case plus an sd card? Am I missing something?

9
10
submitted 7 months ago* (last edited 7 months ago) by gigachad@sh.itjust.works to c/pihole@sh.itjust.works
 
 

SOLVED: After examining the output of pihole -g again I noticed [✓] Parsed 3 exact domains and 0 ABP-style domains (blocking, ignored 1467 non-domain entries) I investigated the link ans saw I accidentally gave the github link instead of the raw file, I changed https://github.com/autinerd/anti-axelspringer-hosts/blob/master/axelspringer-hosts to https://raw.githubusercontent.com/autinerd/anti-axelspringer-hosts/refs/heads/master/axelspringer-hosts and now it works!

I set up my first pi hole yesterday! However I am running into a minor problem, some queries are not blocked.

I have two lists configured:

  • first one if for blocking services related to facebook

  • the second one is for blocking websites related to Axel Springer Media, which is a far right news agency in Germany

Both of them are assigned to the "Extra" group, a group which I created for known devices in my network. I did not set it to default in case guests like to access these websites.

Now, the second list Springer Media does not seem to work. I tested to access www.auto-bild.ro and also facebook.com, facebook is unable to connect, auto bild connects fine. In the query log facebook is shown as blocked, auto bild is green. (also tested that for a couple of other adresses).

Is there something wrong with the lists? Maybe someone is able to help here.

I made sure to run pihole -g after setting up those lists and also rebooted.

Output of nslookup for both requests:

Facebook

$ nslookup facebook.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	facebook.com
Address: 0.0.0.0
Name:	facebook.com
Address: ::

Auto-Bild

$ nslookup auto-bild.ro
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	auto-bild.ro
Address: 104.21.96.28
Name:	auto-bild.ro
Address: 172.67.150.160
Name:	auto-bild.ro
Address: 2606:4700:3037::6815:601c
Name:	auto-bild.ro
Address: 2606:4700:3034::ac43:96a0

Also, here is an excerpt of the pihole.log:

2025-04-29 11:20:40.988 query[A] www.auto-bild.ro from 192.168.178.20
2025-04-29 11:20:40.990 cached-stale www.auto-bild.ro is 172.67.150.160
2025-04-29 11:20:40.990 cached-stale www.auto-bild.ro is 104.21.96.28
2025-04-29 11:20:40.992 forwarded www.auto-bild.ro to fd00::464e:6dff:fe85:1c89
2025-04-29 11:20:40.993 query[AAAA] www.auto-bild.ro from 192.168.178.20
2025-04-29 11:20:40.994 cached-stale www.auto-bild.ro is 2606:4700:3037::6815:601c
2025-04-29 11:20:40.995 cached-stale www.auto-bild.ro is 2606:4700:3034::ac43:96a0
2025-04-29 11:20:40.996 forwarded www.auto-bild.ro to fd00::464e:6dff:fe85:1c89
2025-04-29 11:20:40.999 query[A] www.auto-bild.ro from 192.168.178.20
2025-04-29 11:20:40.999 cached-stale www.auto-bild.ro is 104.21.96.28
2025-04-29 11:20:41.000 cached-stale www.auto-bild.ro is 172.67.150.160
2025-04-29 11:20:41.001 query[AAAA] www.auto-bild.ro from 192.168.178.20
2025-04-29 11:20:41.002 cached-stale www.auto-bild.ro is 2606:4700:3034::ac43:96a0
2025-04-29 11:20:41.003 cached-stale www.auto-bild.ro is 2606:4700:3037::6815:601c
2025-04-29 11:20:41.167 reply www.auto-bild.ro is 172.67.150.160
2025-04-29 11:20:41.168 reply www.auto-bild.ro is 104.21.96.28
2025-04-29 11:20:41.171 reply www.auto-bild.ro is 2606:4700:3034::ac43:96a0
2025-04-29 11:20:41.171 reply www.auto-bild.ro is 2606:4700:3037::6815:601c

2025-04-29 11:21:13.037 query[HTTPS] facebook.com from 192.168.178.20
2025-04-29 11:21:13.039 gravity blocked facebook.com is NODATA
2025-04-29 11:21:13.040 query[A] facebook.com from 192.168.178.20
2025-04-29 11:21:13.040 gravity blocked facebook.com is 0.0.0.0
2025-04-29 11:21:13.041 query[AAAA] facebook.com from 192.168.178.20
2025-04-29 11:21:13.042 gravity blocked facebook.com is ::
10
 
 

Is there a good way to extend how long the login cookie lasts?

I really hate using a password with pihole because it won't keep itself logged in in a browser session for more than ~30min. Pretty much every time I visit it, I've gotta login again. (unlike every single other service I host which remembers you've logged in for at least a week -> indefinitely)

I usually set no password, but Nebula-Sync doesn't support no password yet, so I'm stuck with having them at least for now.

A password isn't a terrible idea, I just don't want to have to enter it constantly.(regardless of using a password manager, that takes forever to popup sometimes)

11
 
 

I've just set up my pihole and I'm considering the best way to configure it. Is it a good idea to set the default group to block (almost) all domains and then manually add trusted devices to another group with a "normal" block list? My use case is untrustworthy devices that I don't want phoning home but which might change their IP address.

12
13
 
 

To save others from a bit of confusion I will make a post here.

The method to change the Web UI is "sudo pihole setpassword"

It will then prompt you for a new password.

14
 
 

To re-enable them, you have to set misc.etc_dnsmasq_d to true either by editing /etc/pihole/pihole.toml or using the pihole-FTL command:

sudo pihole-FTL --config misc.etc_dnsmasq_d true

Source

15
16
17
 
 

This has been doing my head in for the longest and it's time to finally solve it.

RandomText.api.met.no provides the weather for my Home Assistant, however Pi-Hole says it's bogus and is being refused Upstream, which is Unbound. I would really like to fix it. Even if I can whitelist it and just ignore the problem I'd be happy. Any suggestions?

Please talk to me like I'm an idiot, because I don't have the foggiest with this.

I did install unbound-anchor but that didn't fix anything.

18
 
 

I'm not sure this is even a Pi-Hole problem, but since it's most apparent there I hoped someone here can point me in a direction to solve the problem.

Every hour from 10 too till about 15 minutes past Pi-Hole has a lot of N/A replies for DNS lookups. At that moment internet slows down, pages load for 10 or 15 seconds or sometimes not at all. When running dig on the host of Pi-Hole it shows that it can't connect to my router. Pi-Hole is hosted as a container on a Intel NUC with Proxmox. The router is a unifi security gateway. As DNS resolvers I use Quad9 and dns0.eu. Pinging IP addresses keep working during this period. Resolving/visiting local domainnames (like pihole or my NAS) keep working.

Where can I start to look for a solution? It almost feels like a cronjob of some sorts, but there is not a lot of traffic going through the network at these times. Also the proxmox host does nothing at that moment.

19
 
 

Just a PSA: for anyone using a MikroTik router, using it for their DHCP server and are having issues with their devices not using Pi-hole.

If you have set the IP of your Pi-hole as the DNS server and are seeing entries in "dynamic servers" then the router is using your ISP's DNS server causing it to bypass your Pi-Hole.

You need to go to the interface that is supplying your internet connection (PPPoE client, DHCP) and turn off the option "use peer dns".

This will disable dynamic servers and route everything to your Pi-hole.

20
 
 

A new update for Pi-Hole is available.

21
 
 

I've noticed that all my Home Assistant integrations that talk to the Internet are getting SERVFAIL from Pi-Hole. For whatever reason, Unbound just hates them, so I'm constantly seeing api.met.no SERVFAIL in the logs. Does anyone know how to fix this?

22
 
 

I have the Pi-Hole acting as the DHCP server and DNS server too and this works fine for 23 hours and then it flops and I don't understand why.

Basically after 24 hours, all devices just disconnect from the router and when I try and reconnect them, they say they're unable to get an IP address.

But before they drop connection, they all report the DNS server as the Pi-Hole.

If I change my DHCP to static and connect to my router, I see that the Pi-Hole is still connected with its static IP just fine.

If I factory reset the router and then add the same SSID and password, the Pi-Hole automatically reconnects and then all devices can reconnect again, so I'm unsure what the issue is.

Can someone break this down. I feel stupid for not understanding what's happening here.

23
 
 

DNS Resolver

24
5
submitted 2 years ago* (last edited 2 years ago) by sabreW4K3@lazysoci.al to c/pihole@sh.itjust.works
 
 

cross-posted from: https://lazysoci.al/post/13315467

I have a Raspberry Pi 02W running Pi-Hole and ordinarily things work perfectly, but I've got something in my house tripping my fuse box which I'm unable to locate. The tripper, not the fuse box. Anyway, what it means is occasionally, I lose power and so my router and my Pi-Hole go down.

I've configured my /etc/dhcpcd.conf so that my RPi02W can have a static IP

interface wlan0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=194.168.4.100 194.168.8.100

And have rebooted to confirm it's fine, and it's fine.

However when the router goes down and I bring everything back up, the Pi-Hole can't reconnect to the router. I can log in to the router and see it connect briefly, but it's only briefly and then nothing. I even try enabling DHCP on the router and it still refuses to reconnect. Ultimately the only way to get it to reconnect is to factory reset the router, change the password back to my usual password, wait for the RPi02W to connect and then disable the DHCP again. Needless to say it's a pain in the arse.

What am I doing wrong? How do I fix this?

#Solution I switched the DNS servers from Virgin Media to 8.8.8.8 and that seems to fix it. Not sure why, but it does.

25
 
 

Anyone using this set-up? Before I sort out my router, I'm kinda stuck with it. I can get it to work by connecting my PiHole, disabling DHCP and then reconnecting all devices manually. Only issue is that if anything happens to cause the PiHole machine to lose connection, no other device can connect to the router.

view more: next ›