Pi-Hole - Complete guide to whole-home ad blocking!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to YouTube in today's video I'm going to show you guys how to take a Raspberry Pi and a little piece of free software to block ads on your entire network that includes your tablet's your phone's your computer everything that's installed on your network that's to block it for you so let's go and jump down the computer I'm going to show you how we could set this up in about five minutes [Music] alright so get rolling on this project we're just going to need a few pieces of software to get everything set up like I said it taking us about five minutes total once you have all the software so what we'll do is we're going to download raspbian Jessie light right here I'll include a link to all of this in the description below that way you guys can jump right to their website and download anything that you need to so raspbian Jessie light doesn't include the the user interface that you'll see with the pixel here so we'll just download the light version that's all we're going to need so I've already downloaded it once you have R as being downloaded we need to go ahead and throw that on to the SD card so we'll open up 1/32 disk imager we'll go ahead and jump to our desktop which has our images folder and we'll go ahead and grab Jessie light here we have that we're going to hit right make sure that you have the correct device selected here so that you don't accidentally overwrite another USB drive or external hard drive or something like that so we'll make sure we have E and we'll hit right after that let's going to hit continue and it'll start writing files to the SD card so I'm going to go ahead and jump ahead and then when we get back we'll go ahead and continue okay so here we are we've got our Raspberry Pi plugged in to our monitor or in my case we haven't plugged into a capture card and now what we need to do is login to our Raspberry Pi to do that we're just going to use the default credentials of Pi and the password is raspberry all or gate now you'll have a command prompt and at this point like I said this is partially optional reason being is if you wanted to just plug a monitor keyboard into your Raspberry Pi every time you wanted to make much modifications you could definitely do that that's up to you but I prefer to log into and remotely so I'm going to show you guys how to do that to pull up the tool to enable SSH we need to type sudo and then rasp PI - context the first thing we're going to do because we're enabling SSH is we're going to change the user password to do that we're going to click on the first option there it's going to tell us to enter a new password I'm going to enter my password and calcify there we go password changed successfully now the reason why I do that is because we are enabling SSH which allows for remote access into our raspberry pi if someone ever gained access to your network and they were able to to find the IP address of your raspberry pi it'd be really easy for them to get in if they if you didn't change that password because all they'd have to do is use the default now to enable SSH we're going to drop down to option 5 under interfacing options and we're just going to go to SSH it's going to ask us if we want to enable the SSH server we'll click yes and then it confirms that the SSH server has been enabled at this point we can go and click OK and press the right arrow key until we have to finish we should see the command prompt at the bottom at this point our raspberry pi is ready to be logged in remotely you can also at this point grab the IP address of your raspberry pi so that makes a little easier to log in all you need to do is type ifconfig and of our Ethernet 0 we see our inet address which is going to be the IP address of the Raspberry Pi go and write that down and that'll make things a little bit easier for the next step so let's go jump back to here i'ma show you guys how to log in remotely using putty right here we are we're back at the PC and I already have putty launched like I said I will include the download link for all of the software I'm using in the description below that way you guys can find everything real easily now to login to our Raspberry Pi remotely all we need to do is go to the hostname here and I'm just going to type the IP address using the correct keyboard of course put that one down there now we're going to type the hostname or the IP address in our case we're just going to type the IP address every time and hit okay it pulls up our terminal window right here and let me go ahead and resize the window so that you guys can get a better okay so now that we've got that resized a bit let's go ahead and log in we're going to go ahead and use the username pi and then we're going to type in the password that we created in the previous step when we were in the configuration tool let's go ahead and type that in okay and we're back at the same prompt that we saw when we were plugged in to the monitor at this point we're just going to pull up a website and this link will be in the description as well let me turn off that window capture there we go and this is the software that we use it's called piehole and this is a little bit better than a web blocker that you or an ad blocker that you would install in your browser reason being is it actually blocks the the advertisement before it even gets into your network because it's based off of the DNS so when you type in an address and it starts bringing everything back in it blocks it before it even finds the IP of the remote server for that for that specific ad there choose there's two ways to install this we're just going to go through the easy way you can also go through all of their code and install it manually if you'd like but we're just going to grab this code right here at the bottom we're going to right click and hit copy and pull up study once more now to paste this in here all you have to do is select your putty window and right click and now it is paste it just hit enter and it is start going through the end they should process okay as long as we don't get any more prompts from here I'll just go ahead and fast-forward everything and then when it comes back I'll show you guys how to log in whitelist sites that you want a whitelist such as YouTube or if there's another site that you feel you want to support and so you want to whitelist them I'll show you guys how to do that so let's go ahead and tap forward and I'll see you guys in just few seconds okay so the installation is finished and now we've been brought up to the configuration window at this point we'll just go ahead and hit our enter key for okay there is a link here if you'd like to donate if you do like the software now it's telling us that it is a server so that it would like to set a static IP and so in the next few steps we may be installing a static IP as well for this installation I'm going to choose open dns if you prefer Google or level 3 or an organ whatever you prefer you'll just go ahead and select that right here there is also an option if you go down to the bottom for custom so if you have your own DNS server or you have a different DNS server that you prefer you can just type custom and then it asks you for the IP address right there but for this installation we're going to choose open DNS and I'm going to deselect ipv6 because I'm not using it in my network and we're just going to hit OK now it's currently telling us our current IP address that we have set up on our Raspberry Pi in this case because I have a range that I set all my static IP is in I'm going to go ahead and change that this will be different for your network most likely so make sure you take a look at your network and find ISTA IP accordingly or hit no and for my network I'm going to set this to two five one and hit enter so the default gateway it should pull that from the the IP settings if it automatically pulls one from your network if not you could type the Gateway right here and then it's just asking us if the settings are correct we're going to hit yes for this install I am going to leave the web the web admin interface on you can actually whitelist domains from there you can see logs to see how many ads have been blocked or how many have been let through so we can going hit on and we'll leave log of queries on as well otherwise the the graphs and the web interface are completely useless so this point is going to finish the installation and when it comes back I'll show you guys the web the web interface and also show you one last piece once we get finished okay so now the installation is complete it's going to give us a little bit information that we need when we're ready to go ahead and login they give us the IP address along with the password that we need to login to the web interface so let's go ahead and write down that password real quick and then take note of the IP address that you set as well so let's go ahead and do that right now let me get rid of this Raspberry Pi here and now we need to go to 192.168 to fund four to five one flush admin in your case it would be whatever you set the static IP to slash admin and we can see even though we haven't logged in it already is giving us some information such as the DNS queries blocked a total DNS query number of queries that were blocked and then the number of domains that are currently being blocked as well we'd also see that it gives us some raspberry pi status information such as the for temp the load and the memory usage let's go and login and see what it gives us so it's asking us for the password that would be the one that we wrote down on the installation complete page okay and we'll just click that all right and now we can see that the we get a little bit more information we can see what has been queried we can see query types destinations over time and the cool thing here is we can actually set our whitelist and blacklist so we don't have to do that from the command prompt as well if you do it right from the web interface okay so the first thing I'm going to do is go ahead and click whitelist here and show you guys how to add a whitelist so we can see our our ad blocking list that were downloading or already whitelisted I'm also going to go ahead and whitelist youtube.com/ you don't have to do this but I usually whitelist youtube.com/ and any other site that I feel that I want to contribute to or there's creators that I want to contribute to so I will also unblock or whitelist twitch.tv because those are two of the main sites that I use that are generate or content creators that generate their revenue through ads so I like to unblock them that is an optional stuff if you guys would like to go and do that but if there are any other sites that you guys want to add to the whitelist you can just do that right here if there's a site that it's coming through as an ad but you want to black list it you do that under the black list by also typing the domain here or following the example of sub domains domain com they can add that there as well to take this a step further you could at this point just take the IP address of the pie hole and go into the DNS settings on your computer set that as your DNS server and then your computer would have the ad blocker installed now we're going to take that a step further by going into our router I'm going to click my unify settings here and close down my property Hey and under my settings I have an option for eh TP name server I've currently got these set manually to the Google DNS servers but I'm going to remove the first one and on the second one I'm going to type the IP address of our pie hole that we just said and then I'm going to click Save in my case if I go to devices I'll see that my router is now provisioning and this is going to be different for everybody's router but you should see some sort of DNS setting inside your router where you can change that so now that my router has been provisioned and it should have the new DNS setting let's go ahead and go to let's say a gadget comm because I've got it right here on my bar and let's see if it pops up at the ad hey and it did so what we need to do is click our Start button a new menu we're going to open up our command prompt we open our command props we'll do an IP config slash Reno and this should pull the new DNS settings from the router if we wanted to verify that we could go ahead and do an IP config all if we scroll up under DNS servers we see two five four two five one so it pulled the correct one if we a close I'll go back to engadget.com let's see if it pulls up as this time it may still pull them up because it might have them cash okay and it doesn't look like it's going to pull up the ABS so now we see the ad choices area is blocked out and so is this one here we can test this on let's try Yahoo calm because I know that is a site with a lot of ads and it looks like it is already blocking the ads so we've got our blank areas with no ads in them and we're all set we'll go ahead and go back to the console and if we click the dashboard we see that 17 DNS queries were blocked today so that was 17 sites set and I've contained abs and there were total 51 DNS queries so far so that should be everything I hope you guys enjoyed this video if you did drop me a like subscribe to the channel and comment below and I'll see you guys next time
Info
Channel: NateTheApe
Views: 123,101
Rating: undefined out of 5
Keywords: pi-hole, raspberry, rpi, pihole, setup, configuration, router, unifi, ad, blocker, blocking, pi, ad blocker, whole home, raspi, advertisment, networking, projects, project, ad block ipad, ad blocking server, ad blocking with raspberry pi 2, content filtering, content filtering ipad, dns server with raspberry pi 2, domain name server raspberry pi 2, raspberry pi projects, raspberry pi 2 dns server, raspberry pi 2 pi-hole, raspberry pi 2 projects, ad blocking, pi hole, guide, raspberry pi
Id: ytlAN18X5d0
Channel Id: undefined
Length: 15min 12sec (912 seconds)
Published: Sun Mar 12 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.