Tutorial: How to make a Pi-hole.
What is Pi-hole?
A Pi-hole is an open-source program for blocking ads using DNS. When it's setup, it'll block domains on the blocklist and allow domains on the allow list. You can manually add domains to the block and allow lists, respectively.
~~###How does it work?~~
What is DNS?
DNS is the acronym for Domain Name Service which is the phone book for the internet, it translates octets in an IP address to something that is human for example if you go to a command prompt and type ping duck.com
you should get this result: 52.142.124.215
which, if you paste in the URL bar and enter the browser will redirect you to https://duckduckgo.com/. You can do the same for any website, and it'll tell you the IP address for it. You can use this method to test internet connectivity.
What you'll need:
- Pi-zero
- microSD card (16 GB)
- Power supply
- Micro HDMI cable
- Keyboard and mouse
Step 1: When you have everything, you'll need to flash Raspbian to the SD card, I recommend Raspberry Pi Imager for this.
Step 2: Next insert the microSD card into the Pi then plugin the HDMI to the relative ports, the mouse/keyboard will need the OTG cable since it's micro USB to USB A, attach the power cable then give it life.
Step 3: A multicoloured boot screen should appear for around 5 seconds, then disappear. You now need to install the OS to the microSD to do this just follow the onscreen instructions, it should take around 30 minutes to copy and finish installing the files to make it bootable.
Step 4: Finish the language and keyboard setup and connect to Wi-Fi or Ethernet, then reboot.
Step 5: Once the system has rebooted open the command prompt and type sudo apt-get update
once complete follow with sudo apt-get upgrade
this will update and upgrade anything that needs to be and will install the latest version of the operating system.
Step 6: ? Go to https://pi-hole.net, navigate to their GitHub page on your Raspberry Pi (or use another device if you're using the Pi Zero as it only has 512 MB RAM.) and paste this command curl -sSL https://install.pi-hole.net | bash
into your terminal, you'll enter the setup wizard with step-by-step instructions on how to install the DNS sever that is Pi-Hole.
Step 7: You have to complete the setup for pi-hole. Well done! You can see the dashboard by going to the device's IP in any browser, at this point DOH has not been set up, so it will be http instead of https. Alternatively, you can go to http://pi-hole.local/ and reach the dashboard that way.
Step 8: Now that you have Pi-hole DNS setup, you can go to setting in any internet compatible device and change the default DNS to your Pi-hole DNS IP address, reboot and refresh the dashboard page.
Tip: Add the IP for the Pi-hole to your router DNS configuration for it to apply to all devices on your home network automatically.