Network-wide Ad Blocking

What is Pi-hole ?

Well it’s basically an adblocker, capable of removing ads on any device connected to your network for example computers, laptops, phones, tablets, anything connected.

So if you installed it and configured it correctly, you wouldn’t get those annoying ads we all hate to get on our phones, at least not when your using your Wi-Fi connection, the ads will only appear when you use your cellular data.

To learn more go to

Preliminary Note

In this tutorial, I will use the IP address, gateway and DNS, These settings might differ for you, so you have to replace them where appropriate.

Before proceeding further you need to have Raspberry Pi OS Lite / Desktop installed on your Raspberry Pi device. If you don’t already have this, you can use the Tutorial: Installing Raspberry Pi OS to install the Operating System.


  1. Raspberry Pi board
  2. Power supply
  3. Micro SD card
  4. Ethernet cord


Open your terminal and run these commands:

1 Update system

sudo apt-get update
sudo apt-get upgrade -y

2 Installing Pi-hole

curl -sSL | bash

Press Ok.

Press Ok.

Press Ok.

Select eth0, and press Ok.

Select Google (ECS), and press Ok

Select all lists, and press Ok.

Select both protocols, and press Ok.

Press No.

Type, and press Ok.

Type, and press Ok.

Verify the IP address and gateway, if they are correct press Yes.

Press Ok.

Select On, and press Ok.

Select On, and press Ok.

Select On, and press Ok.

Select 0 Show everything, and press Ok.

Write down your Admin Webpage login password.

Start your browser and open

Installation Complete.

Configure DNS

Option 1

Configure your router’s DHCP options to force clients to use Pi-hole as their DNS server.

Option 2

Manually configure each device​ to use the Pi-hole as their DNS server.


Leave a Reply