Pi-Hole – Taking back control of your DNS
I have seen a few posts on twitter recently about people running the Pi-Hole software for network-wide ad blocking. The software was originally built to run on a Rasberry Pi and therefore is very lightweight. I don’t have any Pi’s so i thought lets test it in a VM.
I spun up an Ubuntu VM from my Image Service on My Nutanix CE server
This process allocated an IP out of the IPAM in Nutanix. Obviously, if you dont have this available you will need to configure a Static address.
Make sure your VM is upto date
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install git
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd Pi-hole/automated install/
Input your sudo password and hit Ok! the installer should run and you will be given a few basic options.
Next thing is to choose your favorite DNS provider. I went for custom and then Cloudflare 18.104.22.168
I allowed listening on IPv4 and v6 and left the network settings already applied to the VM and enabled the web interface .
You get a final confirmation page and then your done!!
All thats left to do is to update your devices/DHCP to start using Pi-Hole as a DNS server and your done.
If you want to monitor how Pi-Hole is doing check out the web interface listed in the final screen. In the few hours I have been running it its blocked 28.1% of the DNS lookups my systems have attempted