Block Ads on Your Entire Network | Pi-hole + Docker

NC

This article I will show you how to block ads on your entire network on the Windows platform. Using Pi-hole and Docker.

First of all, you need to install WSL on Windows.

Installing WSL

Click the icon of Windows, then click "Settings".

Block Ads on Your Entire Network | Pi-hole + Docker

Go to "Apps" > "Optional features" > "More Windows features".

Block Ads on Your Entire Network | Pi-hole + Docker

Select "Windows Subsystem for Linux", and click "OK".

Block Ads on Your Entire Network | Pi-hole + Docker

After that, click the restart button.

After restart your computer, you need to update the WSL kernel to the latest version. Use the steps as follows:

wsl --update
wsl --shutdown

Block Ads on Your Entire Network | Pi-hole + Docker

Installing Docker

Navigate to the docker Hub website to download the free community version of docker desktop.

Block Ads on Your Entire Network | Pi-hole + Docker

Then follow the installation process to allow the installer and wait till the process is done. After completion of the installation process click close and restart.

We are now on the splash screen, click "skipped Tutorial".

Block Ads on Your Entire Network | Pi-hole + Docker

Before installing ad blocker you need to setup a static IP address for your Windows computer.

Go to "Control Panel" > "Network and Internet" > "Network Connections", right click Ethernet and select "Properties".

Block Ads on Your Entire Network | Pi-hole + Docker

Setting your static IP address like this:

Block Ads on Your Entire Network | Pi-hole + Docker

Installing Pi-hole

To install adblocker you use this command:

docker run -d --name pihole -e ServerIP=10.11.32.131 -e WEBPASSWORD=routerbest123 -e DNS1=127.0.0.1 -e DNS2=1.1.1.1 -e DNS3=9.9.9.9 -p 80:80 -p 53:53/tcp -p 53:53/udp -p 443:443 --restart=unless-stopped pihole/pihole:latest

You edit the IP address and password to match your computer. Open command prompt and paste your command. It will ask you to open Windows firewall.

Block Ads on Your Entire Network | Pi-hole + Docker

You can vent open pihole : http://localhost.

Block Ads on Your Entire Network | Pi-hole + Docker

Login with the password.

Block Ads on Your Entire Network | Pi-hole + Docker

After waiting time, Let's check the results together. First when not using an ad blocker.

Block Ads on Your Entire Network | Pi-hole + Docker

Now use the pi-hole as your DNS instead of any other. Go to DNS setting in your windows and change the DNS to the IP of pi-hole.

Block Ads on Your Entire Network | Pi-hole + Docker

And after using ad blocking. As you can see, the ads have been completely blocked.

Block Ads on Your Entire Network | Pi-hole + Docker

The next step is to set up DNS on the router so that other devices are also protected from ads.

Block Ads on Your Entire Network | Pi-hole + Docker

Same pihole IP can be used in the home router as DNS as always.

Facebook: https://www.facebook.com/routerbest

Twitter: https://twitter.com/routerbestcom

Tags: Windows 11 Docker Pi-hole