Pi-Hole DNS Server

I love the Raspberry Pi. I have a few of them laying around the house. I gave a Raspberry Pi Zero away at the beginning of this year because I bought one too many. Every once in a while I get a chance to play with them, which is exactly what happened a few nights ago.

I have seen the Pi-Hole project before, and I really wanted to use it as the DNS server for my home network so that I could block ads for all devices on my network. Pi-Hole also has the added side-benefit of allowing me to black-list some domains, in case I wanted to filter specific sites for my kids as they get older.

The setup for Pi-Hole is incredibly easy. From their website, simply run the following:

curl -L https://install.pi-hole.net | bash

After that, simply set the DNS server on your networks router to the IP Address of the Raspberry Pi. You will probably have to disconnect/reconnect to your network before your DNS updates, but once you do you'll notice that ads are being blocked! They're blocked at the DNS level, so you'll most likely notice that sites will load faster, because it won't be loading ads.

Pi-Hole comes with an awesome Stats dashboard as well, which you can access at http://pi.hole/admin (only on your local network of course). From this dashboard you can see various stats about how many ads are being blocked. You will also be able to black-list and white-list domains, which is handy for people like me who need to load certain ads (Facebook won't let you create ads if you are blocking their ad servers).

Pi-Hole Admin

Of course, there are some gotchas that I alluded to above. I discovered while trying to create a Facebook Ad for my wifes Real Estate business that Facebook gives you a warning if it can't connect to it's Ad CDN. I white-listed that domain and it was fine after that. A good way to see what's being blocked is to just open up your browsers Debugger and see what's getting a 404 in the console.



Comments!