PiHole is self described “A BLACK HOLE FOR INTERNET ADVERTISEMENTS”. In other words a network wide ad blocker.
Why is this an advanced tutorial?
This is an advanced tutorial because you will need to have access to be able to reserve DHCP leases and change DHCP DNS settings on your router.
- On your router, locate your UniFiPi and reserve an IP Address. Although you will be setting a static IP later in the tutorial, it’s important to set a DHCP lease so the DHCP server doesn’t allocate your static IP out to another device and cause a network conflict.
- Enable SSH on your UniFiPi
- Log in via ssh to your UniFiPi (Here is a tutorial from the raspberry pi foundation on how to log in via SSH if you get stuck)
- Become root by typing the following:
sudo su -
- Install Pi-Hole by running the following command, Please note it may take some time and will prompt you for a few things:
curl -sSL https://install.pi-hole.net | bash
- Set your DHCP DNS addresses to point to your UniFiPi:
- Manage Pi-Hole – http://unifipi.local/admin/
- IMPORTANT: Please note https://unifipi.local will get you to webmin and http://unifipi.local will get you to Pi-Hole (http vs https)
- If you want to support UniFiPi make a whitelist exception to allow ads on UniFiPi.com 🙂
Colin · July 16, 2020 at 10:09 pm
In UnifiPi v1.6 I was experiencing an issue getting Pi-Hole installed due to a certificate error. A change to the unifi repo was also preventing the installation from completing successfully as apt-get update was unable to complete successfully during the install process.
To resolve the repo problem run the command: apt-get update –allow-releaseinfo-change
To resolve the curl certificate issue preventing the command “curl -sSL https://install.pi-hole.net | bash” from working follow the steps in the last comment in the below link: