Sunday, July 30, 2023

Setting up my Pi-hole on Google wifi and configuring it as a dhcp server

 I recently changed over to Google fiber internet from using Comcast cable internet.  The city had installed Google fiber cable in the street of our neighborhood and having used fiber optic internet in the past, I was excited to change over to it.  Its a dedicated 1Gbps download and upload at a reasonable cost with an added 1TB google virtual drive to upload files to.  The installation into my home was not optimal but eventually they did it right with some complaining.  It comes with two google wifi mesh routers, and I decided to buy a third for better full house coverage.  The google mesh routers are very easy to setup and configure using a phone. However easy doesn't always mean good as I found out when trying to change advance network settings to configure my pi-hole into my new network. Since there is no way to connect directly into the google wifi routers there were several times my phone would just have a spinning wheel and I couldn't change anything and would require a hard reset and completely resetting all 3 routers to get it talking again. Much harder than a traditional router, However in the end I got everything working properly and even changed the dhcp server to use my pi-hole rather than the router.

Instead of writing all the steps it takes, I will summarize of what is needed to change in the google mesh wifi router to get it all working.  It basically takes setting up 3 things, they are:

1.  DHCP IP Reservations:   This has to be turned on with cloud services and the device and IP of your pi-hole needs to be added.

2.  LAN Settings:   Since there is no way to turn off DHCP in google wifi, the only way to use DHCP inside the pi-hole is to set the Start IP range and End IP range to the IP of your pi-hole.  Both will be the same IP.

3.  DNS Settings:   Set up a custom DNS setting to the IP address of your pi-hole.

Note: Google wifi uses 192.168.86.1 gateway by default rather than 192.168.1.1 like most routers so keep that in mind while configuring ip addresses.  If you do something wrong it may require deleting your network configuration, manually factory resetting each google mesh wifi router and then starting over to set up your network like a new installation.   This is where the google wifi falls way short of a traditional router system.  Simple if you don't want to ever configure much but harder when doing advanced networking.

After configuring Google wifi routers and rebooting network log into pi-hole to configure it as a DHCP server just access Settings > DHCP > Click DHCP Server Enabled checkbox.   Configure the range of addresses that you want other devices to use on your network and your router gateway address and then click Save at bottom of page.

That's it in summary, in reality it was a pain to setup but working well with full house ad blocking, recursive DNS, and DHCP from pi-hole computer rather than from the router.  Lots of benefits to each of these things some of which I have posted about previously. 

Overall, I'm happy with the results but sometimes wish I could just accept defaults like most do as it would be less work, it just bugs me when I can't configure things how I really want them.

No comments: