misc
Send your queries to the Pi-hole
Sending dns queries to pi-hole
I despise obnoxious ads that are forced on you, from full page ads to pop-under ads. I understand and appreciate that content creators need to be paid for taking their time and creating awesome content. Nothing in this world is free.
The ads that I do not appreciate have the opportunity to introduce malware into the website, network, etc. Take for example an Android application that you use utilizes an in-app advertisement that allows you to preview another application. That allows this other application to run code inside of your application. This code could introduce malware into the application by an exploit or another injection method. I can not say for sure if this has happened on a mobile app but it has happened on websites.
There are several ways that you can block ads on your network. U-Block Origin can be installed on the browser and block ads in your browser. You can install a DNS server somewhere on your network that blocks ads on the DNS query. If all your usage is in a browser, U-Block is the best option. There are sites such as YouTube that will server the ads from the same domain and make DNS filtering almost impossible.
Here comes the Pi-hole
Pi-Hole is a popular DNS filtering system that one of the primary goals of the project is to run on Raspberry Pi systems. There are others solutions for DNS filtering but in this post we will focus on Pi-Hole.
I am a fan of Debian based systems, Ubuntu, Debian, ParrotOS and more. The following commands should work for all of them. First you will want to ensure that you are up to date. Remember to update often.
sudo apt update && sudo apt upgrade
Visiting https://pi-hole.net/ tells you to download a bash script and run it. My recommendation is not to perform those steps.
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd "Pi-hole/automated install/"
#Inspect the basic-install.sh with your favorite text editor.
sudo bash basic-install.sh
Follow the prompts and ensure that you update your router DNS settings with the static IP of your Pi-hole install. Looking up the model of your router on Google will help you determine the steps for those. This will only work while you are on your local network. You could setup a VPN to force your mobile devices back to your local network to utilize the Pi-hole install.
Some additional notes about my install:
- I do not install the web interface. I prefer command line over web interfaces.
- I do whitelist certain websites. It takes some work figuring out what domains they use.