Setting up Pi-hole

I'd be surprised if using a newer Pi made any difference. The web interface may be a bit quicker but a DNS resolver for a home network is unlikely to put any noticable load on a Pi.

Not noticed any slowdowns or latency on my zero w (but wired).

Thanks both - in my head it was probably more just stealth justification for wanting another Pi :)

Only had a pi for couple of days and already have a list of things to try or that I could use it for.

EDIT:
Next step is likely squid or nginx to help cache steam and psn updates, to reduce the pressure on my crap internet. Thinking a Pi3+ would probably be better for that for the faster Lan if nothing else.
 
Last edited:
I use an original day1 PI1 for my pihole. It sits there on 0% CPU most of the time, shoots up to 2-3% when there is any internet traffic. When running the admin GUI and using the pages it uses between 10-75% CPU but never goes much higher than that.
With the lists I am using I see it blocking between 15-20% of all requests and my general browsing and initial page loading sped up noticably.
 
Well a 3B+ will get you much better ethernet, thought its still on USB so it's still comparably bad. Imho for an actual device where you care about networking there are much better boards out there.
For the amount of traffic, even a 100Mb connection is perfectly adequate. My Zero runs with a £5 Ethernet adapter so the total cost for the hardware was less than a tenner.
 
I use an original day1 PI1 for my pihole. It sits there on 0% CPU most of the time, shoots up to 2-3% when there is any internet traffic. When running the admin GUI and using the pages it uses between 10-75% CPU but never goes much higher than that.
With the lists I am using I see it blocking between 15-20% of all requests and my general browsing and initial page loading sped up noticably.
No difference whatsoever. In fact, my primary Pi-Hole which is providing DNS and DHCP for about 40 devices is running on an original Pi Zero (not even a W).

Cheers both - now up and running with it now I've got to the bottom of my "latency" issue above (turned out to be eset antivirus' Network Attack IDS module, which was slowing everything down).

Also got my old usb printer shared via CUPS :)
 
I need to get mine set up again!

I've had to reinstall the OS around 3 times already. PiHole becomes inaccessible and its down to what seems like the OS getting corrupted. It won't boot, so I have to reinstall.

It is the only thing I run on the Pi, what OS do you guys use with PiHole?
 
I need to get mine set up again!

I've had to reinstall the OS around 3 times already. PiHole becomes inaccessible and its down to what seems like the OS getting corrupted. It won't boot, so I have to reinstall.

It is the only thing I run on the Pi, what OS do you guys use with PiHole?
I have mine running on a RPi 3b using Stretch. Running happily alongside PiVPN(ad blocking everwhere!)
 
Mine are both on Stretch as well, one is a Zero with an ethernet dongle and the other is a Zero W (also with an ethernet dongle). One is the full distro, the other is Lite. I can't remember which is which!
 
I'm using the following block lists, but I want to be able to use the google search results first few links that always go through www.googleadservices.com can anyone tell me what list has this blocked as even when white listed it is still blocked and its driving the wife craxy as her phones "doesn't work as it did before"...
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
 
Go to the web interface, Tools, Query adlists and that will show you what's blocking it.

But whitelisting it should stop that from happening. After whitelisting a domain, make sure you run pihole -g from a terminal.

/edit - Open a terminal window.

sudo nano /etc/pihole/whitelist.txt

Add these lines

4.afs.googleadservices.com
feedads.googleadservices.com
googleadservices.com
m4.afs.googleadservices.com
mimageads1.googleadservices.com
mimageads2.googleadservices.com
mimageads3.googleadservices.com
mimageads4.googleadservices.com
mimageads5.googleadservices.com
mimageads6.googleadservices.com
mimageads7.googleadservices.com
mimageads8.googleadservices.com
mimageads9.googleadservices.com
mimageads.googleadservices.com
mpartner.googleadservices.com
pagead2.googleadservices.com
partner.googleadservices.com
www.googleadservices.com
www.partner.googleadservices.com


ctrl-x to save the file

Then type pihole -g
 
Go to the web interface, Tools, Query adlists and that will show you what's blocking it.

But whitelisting it should stop that from happening. After whitelisting a domain, make sure you run pihole -g from a terminal.

/edit - Open a terminal window.

sudo nano /etc/pihole/whitelist.txt

Add these lines

4.afs.googleadservices.com
feedads.googleadservices.com
googleadservices.com
m4.afs.googleadservices.com
mimageads1.googleadservices.com
mimageads2.googleadservices.com
mimageads3.googleadservices.com
mimageads4.googleadservices.com
mimageads5.googleadservices.com
mimageads6.googleadservices.com
mimageads7.googleadservices.com
mimageads8.googleadservices.com
mimageads9.googleadservices.com
mimageads.googleadservices.com
mpartner.googleadservices.com
pagead2.googleadservices.com
partner.googleadservices.com
www.googleadservices.com
www.partner.googleadservices.com


ctrl-x to save the file

Then type pihole -g
Thanks @Feek
 
What's the absolute cheapest I could set up a pihole? Can you power it from a router usb port?
Yes. I did when I first set one up and my D7000 was able to power a Zero perfectly. It’ll cost you less than a tenner for a Zero W and all you’ll need is an SD card. It works perfectly well via WiFi and if you’re powering it from the router then you’ll be right next to it and can guarantee you’ll have a good signal.
 
Hmm, my Pi-Hole seems to have had a sissy fit during the night.

The last entry in pihole.log is at about 4am:
Code:
Jun 26 04:00:07 dnsmasq[25167]: 404852 192.168.8.169/52626 forwarded imap.gmail.com to 8.8.4.4
Jun 26 04:00:07 dnsmasq[25167]: 404851 192.168.8.169/54664 reply imap.gmail.com is <CNAME>
Jun 26 04:00:07 dnsmasq[25167]: 404851 192.168.8.169/54664 reply gmail-imap.l.google.com is 2a00:1450:400c:c06::6c
Jun 26 04:00:07 dnsmasq[25167]: 404852 192.168.8.169/52626 reply imap.gmail.com is <CNAME>
Jun 26 04:00:07 dnsmasq[25167]: 404852 192.168.8.169/52626 reply gmail-imap.l.google.com is 173.194.76.109
Jun 26 04:00:07 dnsmasq[25167]: 404852 192.168.8.169/52626 reply gmail-imap.l.google.com is 173.194.76.108
Jun 26 04:00:07 dnsmasq[25167]: 404853 192.168.8.169/52626 query[A] gmail-imap.l.google.com from 192.168.8.169
Jun 26 04:00:07 dnsmasq[25167]: 404853 192.168.8.169/52626 cached gmail-imap.l.google.com is 173.194.76.108
Jun 26 04:00:07 dnsmasq[25167]: 404853 192.168.8.169/52626 cached gmail-imap.l.google.com is 173.194.76.109
Jun 26 04:00:07 dnsmasq[25167]: read /etc/hosts - 5 addresses
Jun 26 04:00:07 dnsmasq[25167]: read /etc/pihole/lan.list - 5 addresses
Jun 26 04:00:07 dnsmasq[25167]: read /etc/pihole/local.list - 2 addresses
Jun 26 04:00:07 dnsmasq[25167]: read /etc/pihole/black.list - 0 addresses
Jun 26 04:00:09 dnsmasq[25167]: read /etc/pihole/gravity.list - 128776 addresses
Jun 26 04:00:09 dnsmasq[25167]: exiting on receipt of SIGTERM

The GUI shows no DNS queries after 4am. The GUI also complains that dnsmasq isn't running so I try to start it through the GUI and nothing happens. Starting it at the command line gives this:

Code:
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
   Active: failed (Result: exit-code) since Tue 2018-06-26 07:39:25 BST; 18s ago
  Process: 1502 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE)
  Process: 1499 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

Jun 26 07:39:25 rapihole dnsmasq[1499]: dnsmasq: syntax check OK.
Jun 26 07:39:25 rapihole dnsmasq[1502]: dnsmasq: junk found in command line
Jun 26 07:39:25 rapihole dnsmasq[1502]: junk found in command line
Jun 26 07:39:25 rapihole dnsmasq[1502]: FAILED to start up
Jun 26 07:39:25 rapihole systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Jun 26 07:39:25 rapihole systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 26 07:39:25 rapihole systemd[1]: Unit dnsmasq.service entered failed state.

I assume one of the system updates I installed yesterday has caused this. I haven't got time to work on it now so I'll remove the Pi-Hole from my DHCP server's DNS settings and have a look later in the week.
 
Back
Top Bottom