Setting up Pi-hole

Soldato
Joined
5 Mar 2010
Posts
12,305
Only works for http (not https), so of limited use for the more general internet.

I had a read of the github link after i'd posted, so yeah i see it was more designed for game download caching rather than general overall caching.

Sat here with 640,000 on mine. Feel like an amateur! :D

I think it's more the block %'age that should be the focus. Mine is only blocking around 10% of queries. So in theory i have a lot of domains on the blocklist that never get visited.

Could do with some smart logic to analyse which domains are never getting accessed and trimming the blocklists.

I've pulled my lists from here: https://blocklist.site/app/
 
Associate
Joined
13 Jun 2016
Posts
1,499
Location
UK
I think it's more the block %'age that should be the focus. Mine is only blocking around 10% of queries. So in theory i have a lot of domains on the blocklist that never get visited.
Indeed. My block percentage is skewed by the fact I am running PiHole on a Pi, as well as inside a Docker container with queries being balanced between the two.

Wifey's laptop also has Avast anti-virus on it, which is continually trying to connect to 'analytics.ff.avast.com' and that is massively skewing my results.
 
Soldato
Joined
5 Mar 2010
Posts
12,305
Indeed. My block percentage is skewed by the fact I am running PiHole on a Pi, as well as inside a Docker container with queries being balanced between the two.

Wifey's laptop also has Avast anti-virus on it, which is continually trying to connect to 'analytics.ff.avast.com' and that is massively skewing my results.

I did notice that some avast domain is my top most blocked domain! Show you what **** bloatware avast has.
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
Need some trouble shooting help please.

Was running the stock Plusnet Hub with Pi-hole running the DHCP server without issue.

This week I've ditched the hub and bought a Netgear R8000P router and HG612 modem.

The router allows me to actually assign the DNS address, so switched the DHCP off in Pi-Hole, and I've let the router control it all. I have no internet access.

I've repaired the Pi-Hole installation, I've updated the R-Pi OS, and re-run the Pi-Hole setup a number of times. I'm sure I've left a setting wrong somewhere, but I'm not sure where to look.

Just to be clear, the Pi-Hole address is 192.168.1.150, so the DNS server address is that IP isn't it?
 
Soldato
Joined
19 Oct 2002
Posts
6,824
Location
Bath
Have you enabled DHCP on the router?
Have you rebooted all devices or on windows done a ipconfig /renew?
Does the pi have a static IP?
Is the router getting an external IP?

Sounds more like routing issues rather than DNS.
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
Have you enabled DHCP on the router?
Have you rebooted all devices or on windows done a ipconfig /renew?
Does the pi have a static IP?
Is the router getting an external IP?

Sounds more like routing issues rather than DNS.

Yes, DHCP enabled and working on the router.
I've restarted all devices, but not tried ipconfig command.
Pi-Hole IP is static.
I believe it is getting an IP, pretty sure I remember seeing it on the router status page.

As soon as I add a second DNS IP to the router for example 1.1.1.1 it works. I'm assuming the first option (pi-hole) is failing so it's using the second IP
 
Soldato
Joined
19 Oct 2002
Posts
6,824
Location
Bath
Yes, DHCP enabled and working on the router.
I've restarted all devices, but not tried ipconfig command.
Pi-Hole IP is static.
I believe it is getting an IP, pretty sure I remember seeing it on the router status page.

As soon as I add a second DNS IP to the router for example 1.1.1.1 it works. I'm assuming the first option (pi-hole) is failing so it's using the second IP
In that case either the static IP you think it has is wrong or your pi is not active.
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
In that case either the static IP you think it has is wrong or your pi is not active.

The Pi is set to be static, and also set it in the router to be static.
The Pi dashboard looks pretty empty, so the it seems all the internet traffic is bypassing it.

It says it's enabled and active.

Anything here look wrong?

Q2KtDeK.png
KFelSI3.png
RGdTLGP.png
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
Thinking I may have found something. The original IP of the Plusnet hub was 192.168.1.254. So this was set as the default gateway in the Pi.
I read a guide online to add the correct gateway which is now 192.168.1.1. Having checked the logs, both are present. Do I need to remove the old one? How do I do it?
Code:
[i] Default IPv4 gateway: 192.168.1.1
192.168.1.254
   * Pinging 192.168.1.1
192.168.1.254...
[✓] Gateway responded.
 
Soldato
Joined
19 Oct 2002
Posts
6,824
Location
Bath
You need to reset the ARP cache on the pi. Rebooting should solve that.

Also the last pic on the pi you have an upstream DNS listed, that's not needed and can cause issues with redirects to the pi and router.
 
Soldato
Joined
24 Sep 2015
Posts
3,657
SSH into the Pi and open /etc/dhcpcd.conf in your editor of choice. Search for 192.168.1.254 and you'll probably find it in the line 'static routers' along with 192.168.1.1. Remove the old gateway, save the file and reboot.
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
You need to reset the ARP cache on the pi. Rebooting should solve that.

Also the last pic on the pi you have an upstream DNS listed, that's not needed and can cause issues with redirects to the pi and router.

I read something yesterday about having to add it. Must have been confused, have now removed it.

SSH into the Pi and open /etc/dhcpcd.conf in your editor of choice. Search for 192.168.1.254 and you'll probably find it in the line 'static routers' along with 192.168.1.1. Remove the old gateway, save the file and reboot.

This has fixed it, everything seems to be working OK now. Thanks

I thought I'd be better off allowing the router to control the DHCP, but in actual fact doing this makes the statistics on the dashboard meaningless. It just sows the top client being the router and not the individual devices
 
Soldato
Joined
24 Sep 2015
Posts
3,657
The reason you're seeing that is because all the clients are using the router for their DNS queries which is then relaying the query to your Pi-Hole instance.

If you change the DHCP settings on the router so that the DNS server they're giving it is the IP address of the Pi rather than the IP address of the router then that'd sort that. But use whichever DHCP server you prefer, it shouldn't really matter.
 
Associate
Joined
4 Dec 2009
Posts
518
Copy and paste curl command from website. Follow on screen prompts.

Also your not going to get that level of block success using the standard blocklists.
Which is why they add it to the blacklists manually. A better idea is to download and regularly update some sensible block lists.

Your also never going to get the level of success he showed on you tube as nowadays allot of ads are embedded in the stream and PI-HOLE cannot block those.
 
Soldato
Joined
23 May 2011
Posts
10,199
Copy and paste curl command from website. Follow on screen prompts.

Also your not going to get that level of block success using the standard blocklists.
Which is why they add it to the blacklists manually. A better idea is to download and regularly update some sensible block lists.

Your also never going to get the level of success he showed on you tube as nowadays allot of ads are embedded in the stream and PI-HOLE cannot block those.
Yeah that's the only downside to PiHole. Thankfully uBlock and Youtube Vanced exist so Youtube ads aren't really an issue. The only problem for me now is Chromecast ads but I don't really use that much at the minute so not a huge deal.
 
Soldato
Joined
17 May 2013
Posts
2,861
Location
West Sussex, UK
Having issues attempting to update;

The PiHole is working OK. Web GUI says update available.

Attempted to update the other evening, received an error back for insufficient disk space.
Had a look again today, but everytime I logged in, I was greeted with an error 'this page isn't working' and nothing would load.
Checked Google, results suggested disk space was an issue. Ran 'sudo apt-get clean'. Nothing happened.
Reboot RPi and re-attempt command. Nothing seemed to happen.
Ran 'pihole -up'
Code:
pi@raspberrypi:~ $ pihole -up
  [i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    up to date
  [i] FTL:              up to date

  [✓] Everything is up to date!

Any ideas please?

EDIT: Just to add, I've now been kicked out of PiHole and the web GUI isn't loading, and not able to connect via Putty
 
Soldato
Joined
19 Oct 2002
Posts
6,824
Location
Bath
sounds like what happened when the SDcard died in my RPI1b, if you get a chance give "sudo apt autoremove" a go to see if it would make any difference.
 
Back
Top Bottom