Effectively setup the Pi-Hole on a Raspberry Pi then update the DNS settings on your Router so that it uses the Pi-Hole and then all devices connected won't see an advert as every time one is attempted to be loaded the Pi-Hole handles the request. It's great.
But what about your laptop? They're meant to be taken with you, so you'll see adverts when your elsewhere.
Thankfully the Pi-Hole also offer Docker images, meaning all that you require is Docker For Windows to be installed on your laptop.
So what do you need to do?
- Install Docker For Windows. I'm not going to detail all of the steps but the Pi-Hole image requires a Linux container (which is handy given the size of Windows containers). Downloading Docker For Windows requires you to create an account (or login) to Docker.
- Ensure that Windows containers and not the default, as to set it up we need to embrace Linux.
- Download the Pi-Hole image, to do this open PowerShell and run:
Docker Pull pihole/pihole
This will take a couple of minutes (not long) to download the Linux container with the Pi-Hole installed.
- Create the following directories on your machine:
- Run the following command to start the Pi-Hole image:
docker run -d --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80 -p 443:443 -v "c:/pihole/pihole/:/etc/pihole/" -v "c:/pihole/dnsmasq.d/:/etc/dnsmasq.d/" -e WEBPASSWORD=vRz0n36IWF --restart=unless-stopped pihole/pihole:latest
I strongly suggest that you use a strong password, as the web interface to the Pi-Hole will require this to login. You can now browse to LocalHost in a browser and you should see a page showing that the PiHole is running, although no requests are currently going to it (so it won't actually be blocking any adverts).
- Docker may ask you for an account to share files on your C drive (or wherever you placed them).
- Finally, you need to update the DNS setting for your connection to block adverts. To do this
- In File Explorer right click on Network and select Properties
- Click on your connection
- Select Properties in the dialog
- Then select TCP/IPv4 and then properties
- Then set the DNS settings to be 192.168.0.1 (as the Pi-Hole container is running on your laptop).
- Click Ok to dismiss the dialog boxes and you're done.
- To see the interface for PiHole type localhost into a browser. Click on Login and enter the password (in my example vRz0n36IWF but please change it!).
- Adverts are now being blocked!
- C:\pihole\
- C:\pihole\pihole
- C:\pihole\dnsmasq.d
Hi, I just installed Pi-Hole without Docker directly from github. Everytime I restart my PC I have to manually repair my Pi-Hole installation to make it work. There is no internet connection possible when I don't repair it. Any advice how to setup Pi-Hole (in autostart of Win10) correctly?
ReplyDeleteHello, i am using this and it auto sets everything so give it a try https://github.com/DesktopECHO/Pi-Hole-for-WSL1
DeleteHi there. I used it too but missed the part about the "Scheduled Task". My bad.
Delete