Pihole on a raspberry pi – making a network wide advert blocker with a raspberry pi.
I have a router using dnsmasq with adblocking setup on my router.
I also have a raspberry pi (which was being used as a retropi machine). I also have a Pizero. My retropi setup is moved to my pizero, leaving my PI with nothing to do.
PiHole sounds like an awesome little project, so this post is a Sunday afternoon spent turning my PI into a network wide advert blocker using piHole (and doing the setup from a mac.)
1) Download raspian and install it onto an SD card – install instructions are here:
Basically it goes:
2) Enable SSH on boot
3) Set a static IP address
This used to be in /etc/network.interfaces
Now its in /etc/dhcpd.conf
4) Download pihole (https://pi-hole.net)
curl -L https://install.pi-hole.net | bash
Run through the install and configure your pi to use a static IP address
5) Log in to your router and change your main DNS server to the static IP address of your pi
Thats it – all machines on your network are now using your Pihole on a raspberry pi as their dns and adverts are being blocked!