Ad Blocker through Pi Hole for Non-tech people

Chengzhou (James) Jiang
5 min readJun 14, 2020

--

For most non-tech people or tech beginners, ad blocker is an add on in your browser. However, today I am going to introduce another method to block ads, using Raspberry Pi and Pi Hole.

Why the trouble?

Did it ever bother you that, to live an ad-free life, you need one adblocker for your working computer, one for gaming computer, one for phone, one for your guest, one for your cat, etc…

This is what pi hole is trying to solve. By installing pi hole(a software) in Raspberry Pi(a mini computer), and connecting Raspberry Pi to the router, every device on that router would automatically have the adblocker function on that device. Sounds complicated? It’s actually not hard if you follow this guide.

Who should read this guide

This is a simplified guide. If you are like me, the “don’t give my options just tell me what to do” type of people and just want this to work, please use this guide. If you prefer more self control and want to understand what actually happens, please refer to this guide which is more detailed and more technical.

What do I need

Here is what you need.

  1. Raspberry Pi. Most versions of raspberry pi should work for pi hole purpose. Make sure it comes with the power cable. If you are not very familiar with raspberry pi, just think of it as a mini computer that is capable of doing what a normal computer can do but less powerful.
  2. SD Card. I used a 32G SD card and it’s more than enough. Raspberry pi doesn’t come with enough memory.

Optional, but STRONGLY recommended

  1. Ethernet Cable. Technically you don’t absolutely need it for our ad blocker to work, and you can replace it with wifi, I still strongly recommend you use the ethernet cable instead of wifi because after installation, every time you visit a website, you computer goes to your router and your router goes to raspberry pie. If the connection between router and raspberry pie is weak, all your devices will suffer from unstable internet connection. So, get a ethernet cable.
  2. A screen, a keyboard, and a mouse. Raspberry pie is a bare minimum of a computer, so it doesn’t have any of those build in. Later on, we will need to install and set up pi hole in the raspberry pie, so you will need to see what’s going on, type, and click. This is optional because there is a way to go around this using ssh, which I will not cover in this guide.
Raspberry Pi

Install operating system “Raspbian Stretch Lite”

Just like your computer has windows or mac operating system, raspberry pi also needs one. I recommend Raspbian Stretch Lite, but there are other operating systems that are as competent. Usually when you buy the raspberry pi, it comes with the operating system. Just in case it doesn’t, you will need to manually install it. You can do so by following this guide.

Raspberry Pi’s Network IP

The final step of preparation is to give your raspberry pi an static ip address. You will first need to login to your Wifi router administration page. Find raspberry pi on the list of connected clients. Then, you can set up your static ip address for your raspberry pi. Please follow this guide to do so.

All prepared, let’s get started!

The preparation should take 80% of the time and effort, so if you make it all the way here, you are almost done. Connect your raspberry pi to power, monitor, keyboard, mouse, and ethernet cable. Open up the terminal and type

wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh

p.s. -O is the capitalized letter “O” not number zero 0, although it looks exactly like a zero on the page:(

Press enter to continue. You will see

From here, if you don’t want to read further, just spam your enter and finish the installation.

This one is your self preference. Cloudflare is probably more secure than other DNS services but this may change by the time you saw this article. Do some research on your own if you care about your privacy and security.

You made it!

This is it! Now restart your router, uninstall all the ad blockers on your devices, and you shouldn’t see ad bombs anymore!

I hope this simplified guide helps, and if you want more details and have technical concerns, please refer to this guide.

--

--