Homelab Basics - PiHoleHello there!
Ever hear the term PiHole on any subreddits that you frequent, but wondered what it was? Want to block ads on all your devices? Well PiHole is the solution for you! Read on for how to install PiHole, what you need to install it, and why you would want it.
What you need
A computer with the following specs
-1 Core CPU 1Ghz+
As you can see, PiHole isnt a very demanding program. It is named after the Raspberry Pi, a low powered computer to host small programs. For this reason, we will be using it as a very tiny VM in my DL360 G6.
What it doesPiHole blocks DNS requests from URLs that you provide. This can be used as a content blocker if you have kids to block mature content, or used to block ads. It is mainly used to block ads from a list provided by you. I use it, as do many other homelabbers. It is very versatile, and can be deployed in a number of network configurations.
How to set it upSo as you guys know, I love doing things in one command using the && function in Linux, so here is a single command that installs and sets up PiHole. Just follow all yes/no alerts that show up, and then follow PiHole's amazing GUI.
sudo apt-get install git && git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole && cd "Pi-hole/automated install/" && sudo bash basic-install.sh && sudo apt-get update && sudo apt upgrade && cd
After that is finished, you need to setup whats called a blocklist. These are the DNS requests that PiHole blocks. The linked webpage below should bring you to a txt file. Just copy paste it in to the "blocklists" page in settings.
After this is done, I suggest setting up your router's DNS settings to point to the PiHole. I use an ASUS Router, so the path is 192.168.1.1 -> WAN -> Internet Connection -> DNS - -> Primary is PiHole, Secondary is 188.8.131.52 (Cloudflare). Again, this is my path, so YMMV.
Once you have setup your router to forward all DNS to the PiHole, type sudo reboot to reboot the PiHole. Once the PiHole has rebooted, congratulations! You have now successfully setup a DNS Blocking server.
Thanks as always for reading. I made this guide because I see people recommending PiHole, and others not going through with it because "its too hard". As you can see though, it is quite easy to setup and configure. I love PiHole and have actually donated some money to them (which you can do at their Official Website).