How to Block Ads with Raspberry Pi and Docker

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

YouTube Ads: Server sided, sometimes doesnโ€™t let the video play until u see a ad (especially for popular YouTubers)

๐Ÿ‘๏ธŽ︎ 20 ๐Ÿ‘ค๏ธŽ︎ u/Dinervc ๐Ÿ“…๏ธŽ︎ Sep 12 2021 ๐Ÿ—ซ︎ replies

So I run a Pi-Hole on my Rpi 3B+ but just curious why you used Docker instead of just installing right to the pi.

๐Ÿ‘๏ธŽ︎ 12 ๐Ÿ‘ค๏ธŽ︎ u/kabilos ๐Ÿ“…๏ธŽ︎ Sep 12 2021 ๐Ÿ—ซ︎ replies

I have 2 rpi 3b+ both running Pi-Hole as my primary and secondary DNS - does anyone else run them in a redundancy model like this? I travel for work some and if one quits while Iโ€™m out of town I donโ€™t have to worry about the family losing connectionโ€ฆ

๐Ÿ‘๏ธŽ︎ 7 ๐Ÿ‘ค๏ธŽ︎ u/jleeth ๐Ÿ“…๏ธŽ︎ Sep 13 2021 ๐Ÿ—ซ︎ replies

I use PiHole but recently have been seeing a lot of ads, esp on mobile games. Are the ads evolving.

๐Ÿ‘๏ธŽ︎ 3 ๐Ÿ‘ค๏ธŽ︎ u/khiladi- ๐Ÿ“…๏ธŽ︎ Sep 13 2021 ๐Ÿ—ซ︎ replies

Forgive the title pedantry, but pi-hole blocks the ads

๐Ÿ‘๏ธŽ︎ 2 ๐Ÿ‘ค๏ธŽ︎ u/edwardianpug ๐Ÿ“…๏ธŽ︎ Sep 13 2021 ๐Ÿ—ซ︎ replies

But does it block the !ยค%&/ Facebook ads?

๐Ÿ‘๏ธŽ︎ 1 ๐Ÿ‘ค๏ธŽ︎ u/Turevaryar ๐Ÿ“…๏ธŽ︎ Sep 13 2021 ๐Ÿ—ซ︎ replies
Captions
so in today's video i'm going to show you how to block all ads on your home network using a raspberry pi using docker and using a software called pihole and the first thing we're going to do is we're going to ssh into our raspberry pi and since my raspberry pi has already been connected to the internet and i have set up ssh i can just do ssh and then the hostname which is tutorials tutorials dot local and i'm going to use the user pi i'm going to go ahead and enter my password and i have already installed docker on this raspberry pi but i do have a tutorial to do that if you need instructions but i'm going to first to see if i have any docker docker containers running so i'm just going to go ahead and do docker ps and we can see that we actually have no containers running so now i'm going to switch over to the pihole.net website and here it's going to run us through how to install with docker so install a supported operating system and i'm going to go ahead and do docker install this setup actually uses docker compose which is a nice and easy way to start docker containers with configuration um so i'm going to go ahead and install that on my raspberry pi so sudo apt get docker compose and i actually need to do sudo apt-get install it's going to ask if i want to continue and i'm going to say yes and it's going to go ahead and install the packages we need so now that we have docker compose installed we should be able to do docker dash compose and you can see it gives us a list of commands because we didn't actually properly run it with a docker compose file so that's what we're going to do next is we're going to create a docker compose file to actually start the pie hole container i'm gonna go ahead and clear my screen and you can see here in the quick start the first step is to copy copy docker compose.yaml.exe example to dockercompose.yaml so i'm going to make a directory called workspace and then inside a workspace cd workspace i'm going to make another directory called pihole and this is going to lit this is where we are going to put our docker compose file so i'm going to go ahead and do vim docker compose yemo and within here i'm going to go ahead and copy the contents of this file into here so i'm just going to copy it and then insert in vim is you press the i key and then you can go ahead and paste it and that is it so we can see here if we take a quick look at this we can see that it's going to give it a container name which is going to be named pihole it's going to use the pi hole image and the version is going to be the latest and it's going to open up ports 53 for tcp and udp port 67 for udp and port 80 which is the default port for http with tcp and you can see that it's going to set the time zone to america chicago which is something you can change it's going to set the web password if we comment that out or if we uncomment that out i should say so i'm going to go ahead and actually uncomment this and i'm going to set the web password to something simple just for testing purposes and this can be whatever you want it to be but for testing i'm just going to go ahead and set it to the admin and then it's going to create some volumes to map the data between your host and the actual container and it's going to add some privileges that it needs to actually run the container so now we're going to go ahead and hit escape and then shift colon and then wq for write and quit so now we have our docker compose file if we do an ls-la you can see that we have this docker compose file and i actually put it in the wrong directory so i'm going to go ahead and move that file so move docker compose to pi hole now if we do cd-pie hole do an ls-la we can see that we have the docker compose file here and the next step you can see in the instructions is to run docker compose up dash d and this is going to take the configuration in this docker compose file and it's going to actually start this start the container so docker compose up dash d and you can see that it's doing a bunch of things it is creating the network and it is pulling the pi hole image from the internet so this is going to take a few minutes and we're going to wait for it to be finished and then once it's done i'm going to show you the web interface for pi hole so you can now see that it said creating pi hole done so if we do a docker docker ps we can see and i'm going to actually maximize this we can see that our container pi hole is actually now running and it has a bunch of different ports open and it is has a health and it says starting and it's been up for 10 seconds so if we do a docker logs and then pi hole we can see that it actually started the service so this is very good it set the password it did a bunch of configuration and it is now running on server ip0.0.0.0 which is localhost so now if we navigate back to chrome i'm going to go ahead and navigate to our piehole admin page so it's going to be our host name which is http tutorials dot local and then slash admin and you can see this is our admin page so it's got how many i think how many things are blocked how many domains are on the block list and we're gonna go ahead and log in and our password is what we actually set in our docker compose file which was admin so i'm going to type that in and now we can see that we have our dashboard here and it gives you a bunch of interesting information including the temperature of your cpu the memory usage the cpu usage of your raspberry pi so if we actually go to a the tab called group management and then we go to add lists you can see here that we have a config a default configured ad list and this is where it is blocking a bunch of different domains so if we click on this link right here it's going to pull up a basically a file and it's a host file and you can see that is blocking a bunch of different ads these are all the websites that it is blocking and this is a crowd-sourced crowdsource list of ads that get blocked automatically through your pi hole and you're able to add more if you are able to find other lists you can add them here by just clicking add pi hole is an extremely powerful tool you can actually use it as a vpn which is something that we won't be doing in this video but if you definitely like the video and you want to see that if you want to see pile be used as a vpn to be able to block ads anywhere you go please drop a like on the video and consider subscribing if you want to see more content like this and that is it for now that is all you have to do to get pi hold to start blocking ads on your home network thank you for watching and i will see you in the next video
Info
Channel: Ryan Ward
Views: 1,848
Rating: undefined out of 5
Keywords:
Id: kwuHPUNevqU
Channel Id: undefined
Length: 9min 9sec (549 seconds)
Published: Sun Sep 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.