PiHole
How to set up a PiHole
Last updated
Was this helpful?
How to set up a PiHole
Last updated
Was this helpful?
An install guide by Kyle
Using a Raspberry Pi as the networks DNS server, “blocks ads for all your devices without the need to install client-side software. The Pi-hole blocks ads at the DNS-level, so all your devices are protected.” This also allows ad blocking on devices which do not support it (think mobile/tablet)
This guide has been tested using Raspbian Jessie, macOS Sierra 10.12.3 & PiFiller 1.3 and works.
MicroSD card (min 4GB)
MicroSD card reader to USB depending on your computer
A way to burn images onto SD card - I choose
Raspberry Pi with a power cable, monitor (just for install set up, can be run headless later), keyboard for initial input, - Ethernet cable to connect the RPi to the router, Wi-Fi adapter for RPi
Access to administration panel on the router (this information is typically next to the SSID on the bottom of the router)
Download latest
Burn this image to the SD card using . You can optionally use dd or another method to burn it. PiFiller is the fastest and easiest way I have found to do it.
Attach Raspberry Pi to monitor & keyboard, connect via Ethernet to the router and insert the SD
Then power on. If its done in a different order it can fall over.
Check you are connected to the internet (ping 8.8.8.8 is easy way to check, this is Google’s DNS server so if thats down today will be a bad day)
Update the Pi using sudo apt-get update -y
Optional: install a different text editor, nano is installed by default. sudo apt-get install vim -y
Configure a static IP address to allow headless use of the Pi
run route -ne and note the default gateway IP address (routers IP address)
Now we need to edit the dhcpcd.conf file using sudo vim /etc/dhcpcd.conf
The following information needs to be added to the bottom of the file:
sudo reboot
will allow all changes to take effect
To check it has worked run ifconfig
and eth0 should be assigned 192.168.0.88 (or whatever you chose)
Enabling SSH: this is on by default on the Raspberry Pi - if it is not working run sudo raspi-config
and enable it in the advanced > ssh menu.
Optional: create a bash alias in .bash_profile
to allow easy entry. I added alias pihole='ssh pi@192.168.0.88
' so logging into PiHole is as easy as just typing it into terminal.
The install covers it all, its very easy to do, remember and note the admin password produced.
The default credentials for the Raspberry Pi is username: pi
& password: raspberry
You cannot edit the DNS servers on the Virgin HomeHub and after searching around it also seems to be the same for Sky, BT and other broadband providers. DNS servers must be modified on devices on the network.
iOS
Settings > Wi-Fi > “Networking Name” > DNS
(192.168.0.88 in this example)
Android
Settings > Long press on the Network Name > Manage Network Settings > Show Advanced Options > DNS 1
macOS
System Preferences > Network > Advanced > DNS Tab > +DNS Server
Windows 10
. Network and Sharing Centre > Click on the connection type > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > Select “Use the following DNS server addresses”
and add in the IP address of the Pi
Generate SSH-Keys to allow passwordless entry - this is an easy to follow
on their GitHub is best
Run sudo curl -sSL | bash
The Web interface will be installed automatically so you can view stats and change settings. You can find it at: or
Quoted from their