— Ad block, Raspberry Pi — 1 min read
2023 already. Nice. More layoffs. Not so nice. I decided to setup the Pi-hole recently to reduce the amount of tracking and ads on my network. A pie hole is just a munchkin while a Pi-hole is a program used to block unwanted network traffic. Traffic is blocked at the DNS level using a concept known as DNS Sinkhole. DNS sinkholes are used to takedown malware (prevent bots from connecting to malicious domains).
Pi-hole uses this concept to block devices from connecting to certain servers. It uses ad lists (which you can import from Github) to block any requests to those addresses.
Follow their setup guide for an easy way to install the pi-hole. Read on for the longer way =). Download the Raspberry Pi OS Lite version to reduce the number of extra packages. Flash it onto the SD card using something like balenaEtcher. Next, navigate to the SD card in your terminal. Add a few files to enable ssh.
1$ touch ssh2$ openssl passwd -6 -salt '1234567890' -stdin <<< 'raspberry' > userconf.txt
Note: for macOS make sure your openssl version is correct.
Insert the SD card, connect to your ethernet and power on your raspberry pi. Find the raspberry pi ip via the router or scanning your network. Verify you can ssh into the pi:
1$ ssh pi@<ip address>
Set a static ip address on the pi.
Now that the pi is up, ssh into the pi and install the pi-hole software:
1$ curl -sSL https://install.pi-hole.net | bash
After a few prompts you will have the pi-hole running. Verify it is running by logging on to the admin panel. You should see the dashboard below:
Congrats on setting it up!
To build or not to build...