Setting Up a new Pi Hole
My personal steps on setting up a new instance of Pi Hole on a Raspberry Pi, specifically one that will communicate correctly with my other Pis, act as a reverse proxy, etc…
Steps
- Ensure that the Raspberry Pi is set up according to Setting Up a New Raspberry Pi
- Important: Ensure that the RPi has a static IP and it’s set up in your network DHCP settings to be a DNS server
- Follow the installation instructions found here
- Change the password via the commandline:
pihole -a -p - Log in and restore from a Pi Hole backup
- Create / update the
/etc/pihole/pihole-FTL.conffile (see below for my settings) - Install
unbound: https://docs.pi-hole.net/guides/dns/unbound/- Ensure to configure
unboundaccording to those docs ^^
- Ensure to configure
- Configure the new Pi Hole’s DNS settings with the following adjustments:
- Uncheck all Upstream DNS Servers
- Check 1 custom Upstream DNS Server and put this IP address:
127.0.0.1#5335 - Make sure that “Recommended setting” is checked just below that
- Ensure that the following are checked:
- Never Forward non-FQDN A and AAAA queries
- Never forward reverse lookups for private IP ranges
- Use DNSSEC
- Install Gravity Sync
- Note: Just to make sure that everything is working as expected, I actually purge/remove Gravity Sync from all other devices and re-install across the fleet of Pi Holes that I have. This is largely due to the generation and placement of SSH keys during the Gravity Sync process.
- One More Note: It’s important to ensure that each Pi has a valid password set for the other pi. If not, I had to do manual SSH key passing from one machine to the next to get
gravity-sync pushandgravity-sync autoto work
Pi Hole Conf
#; Pi-hole FTL config file
#; Comments should start with #; to avoid issues with PHP and bash reading this file
RATE_LIMIT=3000/60
MAXDBDAYS=14
PRIVACYLEVEL=0