How to setup up a Pihole docker container for network wide adblocking

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys and welcome to this week's video in this video we're going to be blocking those annoying adverts network-wide using the piehole docker container now let's get started [Music] [Music] [Music] so before we start what is piehole well as the title of the video says it blocks adverts on the web for your whole network but why is it actually called piehole well it's not your mouth where you shove your pies and other food down it's because it was originally used on the single board computer the Raspberry Pi and it's a black hole where all the adverts can go into hence the name pie hole right so that's how it got its name but the really great thing about pie hole is that it runs on your whole network and you don't have to have any client software all you have to do is use pie holes IP address there's your DNS server and so what this means is any device that connects to our network whether it be a laptop a cell phone a tablet the ads will be blocked no matter what the device is so you may be thinking hey I use an ad blocker in my browser and I don't need network-wide blocking well even if you don't need network-wide blocking piehole is better than an ad blocking browser extension and towards the end of this video I run some comparisons but then you can see if you agree with me or not right so let's just jump straight in and set this up on your own raid server that's normal we're going to go across to the apps tab and do a search for pie hole so let's click on the button to install okay so now we need to set up the template and the first thing we're going to do is we're going to use one of the new features in under 86.4 and onwards which is being able to assign an IP address to an individual doctor container so at the moment you can see it's set for network type bridge so we're going to change that and I'm going to use that custom br0 now I've got two different ones here because I've got two different networks on my server so you'll probably only have the one so just click onto custom and then in here we can give the container an IP address and I'm going to give mine 10 10 22 and this IP address is used for us to both login to the web UI of piehole also there's the DNS server on our network and when you'll choose them the fixed IP address we can see the subnet on the right here mine's 1010 20.0 forward slash 24 and when we see the network written in this way when at the end it's got a zero then forward slash 24 it basically means we can choose any free IP address in the range of the one right the way through to two five four and because my internet Rooter was on 1010 20.1 I thought it good just to make the IP address for the piehole docker container 3 1010 20.2 okay so with the IP address now set let's scroll down the templates and make some other adjustments as well so the next thing that we're going to change is here where it says contain a variable server IP so we want that to match what we were just put as the fixed IP address above so for me it's 10.10 dot dot 2 and then underneath here we've got the various DNS servers that we can have piehole use by default they're set to the Google DNS servers and I'm going to leave mine as that now further down we can change our time zone here I'm in the UK so that's absolutely fine for me and here we can change the password to login to the web UI of piehole and by default it's set for admin and I'm going to leave it as that and the rest we can just leave just as is so let's scroll down and click apply and that will pull down the container okay so that's done so now let's click on the done button and then go on to the docker tab now we can see that pie-holes running so I'm gonna click on to piehole and then go to web UI and that brings us to the piehole dashboard and on the dashboard we can see things such as the total queries that have gone through piehole and how many clients how many of those queries have been blocked or the percentage of which have been blocked and here we can see the domains that are on our block list and this block list it's important as it's how piehole knows and updates which domains to block so we don't see any ads and we can actually add additional lists to this block and that's what we're going to do next but first we're gonna have to log in to get to the piehole settings so to do that click on here where it says login and then pop in the password and a password is whatever you put in the template and I left - admin and now if we go down here to settings and we click on to block lists these are the block list that comes standard with piehole but we can add a new block list by putting in a URL here and there's a great list that I found posted on reddit by wall e3k and this lists the big block collection I put a link to it in the description and you can see it here and you can see this is a really comprehensive list with a lot of things that we can add so to add an extra block list we just copy the URL and then go back across the pie hole and just paste it in here and then click on save and update and pie hole will now update the black list so with that done let's go back across the dashboard and if we look here the domains on the block list because we put that extra list in have now gone up to 120 2,980 so the more items we add to the block list the bigger pie holes black hole gets and the more ads get sucked up so on the computer I'm making this video on I've already changed the DNS to be pointing to pie hole and I'll show you how to do that in a moment but quickly now I'm just going to do a little bit of web browsing and then we'll come back to the dashboard and see what's changed on here and so now you can see we've got a few more statistics on the dashboard and we can see here the total queries from one client and that's the computer I'm on now there's been a hundred and forty five of which twenty seven have been blocked or as a percentage of total 18.6 so that's how the blacklist works and the whitelist well that's the complete opposite here we can put an end to main which we want to be excluded from being filtered by piehole so you just put into this box and then click Add okay so now we've talked about our whitelists and blacklists let's have a look at how we configure our network to use piehole so as I said earlier what we have to do is just change the DNS so it's pointing to piehole and the easiest way to do that is by adjusting the DNS in the DHCP server now for most people their DHCP server will be in their internet router so when any device connects on to your network it will get a network address from your DHCP server this will include which DNS to use now root is from different manufacturers are going to be slightly different the DHCP settings are normally found under the Advanced tab and under the LAN settings so let's have a look at this router an Asus AC 68 you we can see that the DHCP server is enabled and it will be by default so just leave it like that now I just mentioned now there is a scenario whereby we may need to disable the DHCP server and actually have piehole run DHCP duties but more on that in a moment right so just looking at the starting and ending pool addresses here that's a block of IP addresses that will be given to clients when they connect to the network and you can leave this set as it is the default gateway will be the IP address of your router and again leave this as it is it's here the DNS server this is what we need to change the way this Rooter is currently configured is to use the Google DNS which is 8.8.8.8 so what we're going to do is we're going to change this to the IP address of the piehole docker container and then our router will give out that as the DNS server for all the clients so they'll now start filtering out adverts but some routers can be problematic and they may not allow you to change the DNS in the DHCP server settings and this is one such router here is called a BT Smart Hub and they're quite common over here in the UK so if I go across to the DHCP server settings on this router you can see here the settings are very limited yeah we can change the IP address range for the pool for the clients but little else I couldn't see anywhere in the DHCP settings where I could choose my own DNS so this is where we'd need to disable the DHCP server settings on the router then having done this we need to go back over to the pie hole web UI and then go to the settings and then from here we click on the top where it says DHCP and then we want to just select this checkbox here so the DHCP server is enabled so now pie hole will be running as the DHCP server on the network now it's important to only have one DHCP server on your network so you must make sure if you're using this setting that you've disabled it in your router just check the IP address range pull is okay for your network if not you can just change it here and also just check that your Rooter gateway IP address is also correct so once that's done just scroll down and click on to save and now the pie hole container will be the DHCP server giving up the IP addresses on your network if you'd rather not touch your Rooter settings at all then you can just add the DNS server in the settings on your actual computer to be pointing to the piehole container okay so now having changed in the DNS with ease your router or manually you'll now be blocking ads so let's take a look at it in action so first we'll have a look at a website without using PI home and as you can see there's two adverts showing so now let's look at the same website but this time using PI whole to filter the adverts and now we can see that those two ads are no longer showing now if you remember at the beginning of the video I said that I considered a PI whole better at blocking out verse then some browser extension it was the same and this is why by using an adblock that's a browser extension it can easily be detected by the website then sometimes they'll block you but using pi whole because it's not running in the browser it doesn't get detected right so just one last thing to look at what happens if you want to change the actual DNS servers that piehole uses we click on the Settings here and then go to DNS normally this is how we change them now a lot of people might not want to use the Google DNS service and maybe once you say quad 9 but we don't want to actually change anything here for our Sun Raiders we want to make any changes to the DNS in the docker template itself so if we scroll down to the bottom of the template you can see here this is where the DNS is set so if I wanted to change the quad 9 which i think is an excellent DNS provider I just put in the primary DNS here and quad 9 secondary DNS underneath just here and then click apply so now let's go back across the pie hole and log back in and if you look our DNS is now set for quad 9 and the reason we don't change the DNS here is because once we update the container these DNS servers will always go back to what are set in the template ok so that's what we do if we want to change our upstream DNS service right ok so that brings us to the end of this video now I hope haven't actually left anything out important about pie hole I don't think I have but if I have then please share it down in the comments below anyway guys it's time for me to go now and I really hope you found this video useful and if you did then please help me and hit that like button and subscribe to the channel if you're not already and if you really like what I'm doing and you'd like to help support the channel then any donations they're really appreciated which you can do through the PayPal or patreon linked in the description of this video or the channel home page anyway guys whatever you're up to for the rest of the day I hope it's good and I'll catch you all next time
Info
Channel: Spaceinvader One
Views: 103,000
Rating: undefined out of 5
Keywords: pihole, pi-hole, adblocking, network wide adblocking, unraid adblocking, unraid adblocker, linux, docker container, pihole docker, how to setup pihole, lime technology, lime tech, spaceinvader one, kvm, home server, unraid, unraid tutorial, how to, guide, tutorial, How to setup up a Pihole docker container for network wide adblocking
Id: 2VnQxxn00jU
Channel Id: undefined
Length: 12min 52sec (772 seconds)
Published: Mon Mar 26 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.