Block EVERY Online Ad with THIS - Pi-Hole on Raspberry Pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Installed PiHole a few months ago. Best. Move. Ever.

Now if it could only block fucking YouTube ads...

πŸ‘οΈŽ︎ 47 πŸ‘€οΈŽ︎ u/NucleativeCereal πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

I've been running a pihole for a couple years now. It combined with smarthome gear is a perfect pairing. It allows me to block almost anything going on and it gives a nice dashboard so you can monitor your network.

Also, people should check out /r/pihole

πŸ‘οΈŽ︎ 9 πŸ‘€οΈŽ︎ u/[deleted] πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

Ok, I installed it right after the video.

A few things that slowed me down a bit:

  • If you install raspbian Lite, SSH will not be activated by default. At least it wasn't for me.

  • Setting keyboard layout is weird on Raspbian. It will ask you for the keyboard model you have which obviously will likely not be in the list. I choosed "DELL" as a generic keyboard and then my FR layout and it worked out. Still quite surprised the first question you are asked is what model of keyboard you have.

  • If you want to change the PiHole web interface admin password, you need to connect on SSH and do:

    pihole -a -p

  • After installing raspbian, you should do a "sudo raspi-config" command and setup a new password right away (and change the keyboard layout if necessary).

  • Default login/password are "pi" and password "raspberry", at least on a Raspbian lite.

Apart from that the installation was overall fairly easy, I definitely consider it was worth setting up so far.

πŸ‘οΈŽ︎ 10 πŸ‘€οΈŽ︎ u/Tetsuo666 πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

This video is exactly like this picture draw the owl

90% of the tutorial is installing raspbian/pihole and then ssh'ing into the pi

he literally skips all of that and tells you how to go though the menus on the pihole, like what kind of tutorial is that lol

πŸ‘οΈŽ︎ 27 πŸ‘€οΈŽ︎ u/Frozencold19 πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

Set up one right after watching this video (I had an old rPi laying around) and it's been working flawlessly ever since. Amazing stuff.

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/fbnlsr πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

If you have a router running OpenWRT you can achieve similar results by enabling adblock.

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/muederJoe πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

thanks for posting this!

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/[deleted] πŸ“…οΈŽ︎ Sep 04 2019 πŸ—«︎ replies

Sadly pihole is incompeteable with Chromecast. Since Chromecast has default Google DNS which results in conflict. Anyone had a good solution?

πŸ‘οΈŽ︎ 1 πŸ‘€οΈŽ︎ u/neodatanode πŸ“…οΈŽ︎ Sep 05 2019 πŸ—«︎ replies
Captions
okay look i know what you're gonna say linus why are you showing me how to block ads that's how you make money and you would be right youtube's adsense is a big portion of our revenue here at linus media group guys if you like this video and you do deploy the solution please buy a shirt or a hoodie lttstore.com all right but we also understand that many of the people who would be determined enough to set up something like this probably already have some form of ad blocker probably in their browser so kit today we're going to show you guys how to set up pi hole a dns based filtering tool that can be configured to block advertisements tracking and even known militia sites and malware on your entire network with this wow that was a good throw you almost got me a computer so cheap that i am gonna drop it right now like a mic speaking of the only one it's been a while since one of our videos has had just one sponsor like smart deploy with smart deploy you don't need any on-site i.t you can deploy images apps and scripts over local network or the cloud so go to smartdeploy.com linus and claim your free licenses worth over seven hundred dollars we'll have that linked below [Music] traditional ad blocking tools like you would find on the chrome store like adblock or ublocker work from within your web browser they analyze the incoming data sent to your pc when you load a website and they remove or replace any content that is recognized as an ad now this works great for that one browser or maybe even that whole computer but what about ads on devices that don't have or allow ad blocking like the advertisements baked into mobile apps or on your smart tv or even on the google mobile discover page that is where pi-hole comes into play so here's an example you launch a mobile game on your phone and all the assets required by the game start loading you've got your your textures your dialogue your music etc well at that same time a request is being made to the url of the server which manages ads for that app your routers specified dns provider then looks up that url and replies to the phone with the ip address of that server so that it can load the ads now it's done this way rather than just baking the ads into the app download because among other reasons it allows advertisers to dynamically serve individually tailored ads even from multiple providers across multiple servers what a pie hole does is stand in between your dns provider and your device then if pi hole has that requested url in its blacklist rather than forwarding the request along to your regular dns provider and subsequently connecting you and whatever's on the other side in this case an ad server instead piehole stops the request in its tracks and replies with an unspecified address essentially telling the device like your phone hey that ad server don't exist sorry so this is referred to as a dns sinkhole now at this point depending on how your app or your device's advertisement code handles errors you'll either be left with no add at all or an error so no ad or no ad another cool benefit is that once you've configured it this setup can be applied to practically anything like blocking known tracking services blacklisting adult sites from users on your network or even preventing malicious sites or malware from talking to their controlling server and that all sounds great but for the less network savvy among you it also probably sounds kind of complicated so how do you set it up believe it or not it is simpler than you might think pie hole is designed to be highly compatible and it can work on almost any linux system in a docker container or in a vm so long as you point your dns settings to it most people though deploy it on a cheap embedded computer like this five dollar raspberry pi zero though so to complete your setup you'll also need a couple more things a micro sd card a micro usb power supply and a micro b to ethernet dongle we're assuming here that you already have some cardboard to house the pi a way to install the os 2 micro sd card and an ethernet cable now even with this setup there are some command line moments that might be challenging for linux novices but we've created a full step-by-step tutorial thanks jake on the ltt forum which will be linked in the description below for the rest of the video we're going to assume you've got raspbian installed you've changed your default password you've configured a static ip for your pi and you're ssh into it our next step then is to navigate to the pi hole website and copy their one line install command run it and work our way to the networking section we select our default network adapter eth0 and then our desired upstream dns provider this is where the pi hole will forward a request if it's not in any of our blacklists on the subject of blacklist then the next screen is kinda where the magic happens it's blackmagic get it yeah it's terrible so here you'll find a handful of curated blacklists where you can select which one or multiple ones you'd like to use we're gonna stick with the default as it seems to work pretty well with minimal false positives depending on your browsing habits by the way another thing that we've included in the tutorial on the forum is a great tool for white listing common false positives next we're going to leave filtering on for both ipv4 and 6 and assuming the static ip that we specified earlier is the one that pi hole shows on the next screen we're going to say yes to that as well the rest of the settings like whether to install the admin panel the web server and the logging mode will be left at default and should for you as well unless you really know what you're doing now some processing will occur and bam you will be presented with the password and url for your pi hole admin panel logging in then reveals a vast array of pages with analytics a list showing you which devices are using pi hole or not manual white and blacklisting and configuration for your mass blacklists it's pretty freaking cool and really customizable now here's the thing though when you set it up this way pi hole will still only work on a device by device basis so you will need to manually change your dns settings on each one of the devices that might be on your network if you want to kick things up a notch and make it the default for your entire network and everything on it you will need to change the settings on your router now to avoid everyone getting mad we won't actually be changing anything on the office network so we're going to manually point a couple of devices at our pie hole like this iphone right here and the smart tv behind me both of which have ads uh so jake i don't think this tv is actually gonna let us change settings these are the expert settings this is like the network engineer you get to turn ipv6 on and off open network settings maybe that one nope this isn't looking great hey yeah try that yes should we we should do it before can we even find an ad on this tv i was looking earlier and i couldn't find one so oh so maybe they've cleaned up their act a little bit or yeah they are turned on you can toggle them on this tv but yeah we might just have to go to the internet browser maybe it waits and doesn't like spam you with ads right out of the box i mean youtube would probably serve as an ad the thing is youtube ad blocking with pi hole isn't amazing because the url's changed so much oh interesting um it might work yeah there's an ad in this instance okay so let's give it a shot that is one thing with pi hole is the urls change on youtube ads so much and it's completely customizable by you so you would have to kind of keep track of those video ad urls and there's probably some repos that are pretty good for it but uh dope yeah so 77. oh god oh this is painful to enter i think you can talk to it yeah that's definitely gonna be better okay you are connected to the internet blippity bloppity and closed okay so i'll pull up the pie hole thing on our laptop here okay let's try another video here mine is tech tips pc build no dollar wasted pc build guide nothing 1000 gaming pc build guide nothing i'm surprised it's working uh youtube also doesn't serve an ad every time this is true so we might have to watch for a little while so i'm going to let this video play for a little while so that my viewer satisfaction seems pretty good actually well you can see if it blocks anything right uh yeah i just want to look at our user device list here okay so one of these it's definitely this one this is yeah with the 15 queries so samsung ads blocked look at that whoa i can already see that ads.samsung.com blocks look at that that's sweet just like that hey okay well hold on let's see if it grabs let's see if it actually blocks anything from youtube i haven't gotten any youtube queries yet so let's try uh let's try a refresher yeah i don't know we haven't got any new is this an ad the click kind of looks like an ad is this just the video i don't think so click with the thing what even is this this is the video oh we kicked luca oh nevermind that's just our video this is just a really weird video yeah all right so i mean success i guess okay so should we move on to actually here why don't we do a simple one let's do the pc okay speedtest.net they're the worst this came to mind as soon as i was looking for a site that has ads this thing has literally five ads on one page so if we go down here open network settings go to change adapter options so if we go to one we're going to do 10.20.0.77 which is our pi hole and i'm not going to set an alternate dns server because we don't want to you know give it any chances to not use it yeah and then we close out here i might have to flush our dns but let's just try it blippity bloppity oh do we have ipv6 here i'll just turn ipv6 off yep there we go all right you're on okay let's try that again okay wait a minute some of them are down yeah okay so sometimes ads will get through and then we can take this actual url add click.g.doubleclick.net let's try to remember that and go blacklist adding to the blacklist success okay so let's see wow they're determined they're determined buddies there i think what it is is it's just caching the dns i don't know how to do this on edge like why is this so why are you using edge what are you even doing just use chrome all right just right click chrome open incognito tab okay so here we go there we go in chrome and it's not working you're done bud no more ads okay so clearly it was just edge dns caching but uh yeah no more ads on speedtest.net why don't we move on to the iphone so on here configuring our dns is again pretty straightforward we're just going to set it to manual we're going to add a server 10.20.0.77 you need to delete all the other ones and oh dang it yeah i guess that's true there's so many but uh well no these were entered by us at some point these are all like oh so we would enter so now um actually speed test is one that we could check here as well it's an app right so i go ahead i click go [Music] blah blah blah we are doing a speed test that's actually kind of weak sauce yeah it's not that great look at that no ad no ad it's gone so in this case we ended up with the sort of the the blank spot as opposed to just the element not loading at all because clearly their app just has like a placeholder yeah uh oh we should try flappy bird it's on the bottom there oh i had uh i had actually loaded up a tweak town on safari this might cache but oh it doesn't look like it did nope wow they're gone bye dude try flappy bird because that has like the old school banner ad on the bottom all right go on it's not even there it's gone even within games this is pretty cool so one more thing is now that we've been tooling around with this stuff for a little while um i want to try again and see if we get a youtube ad so why don't we go with smallest no compromises laptop and nothing this is working better than it was before actually you know what would actually be really cool guys if you liked this video um we should do that video you suggested a little while back so one of the big problems with not necessarily youtube on your smart tv but netflix is that they have blocked most of the major vpn providers so what they can't block is an individual setting up a us-based yeah a diy vpn based out of the us let's do it that they can reroute all their traffic through so i want to do that for like two years okay so guys make sure you're subscribed we are going to do that video fine diy there you go but other than that i think that's about it so pie hole super cool tool like aside from ad blocking let's say there's a site or a domain or a pop-up that looks super spooky or maybe you don't want your kids seeing or you don't want your employees wasting time with or whatever the case may be all you do is take a domain plunk it into pie hole and it's gone across the entire network that is unless your users are savvy enough to configure their own dns uh on their device in which case you're pretty much hooped so i think we're going to change our steem cache to a steam blocker this total game changer what we don't want to play video games at work you know so anyway i'm blown away by how much we can do with this computer it's not that one exactly that's fine it doesn't matter this computer that costs less than your non-fat half-sugar mocha latte frappe or whatever that you got this morning i guess it shouldn't surprise me that much given how well this thing actually ran a surveillance server a while back so if you guys are looking for something to watch now you should definitely check that out that's over here speaking of things you should check out our sponsor for today's video privacy.com privacy.com is a free easy to use service that hides your credit card number it works by creating a virtual card number that is locked to whichever merchant you are shopping at so even if that merchant gets hacked the bad guys won't be able to just use your card anywhere they please and if they try you'll actually get a push notification so that you're always in the loop and you can cancel the card immediately cards are super simple to set up you just need to create an account link your virtual cards to your checking account or debit card add a limit and voila you're all set they've also got a browser extension that autofills information for you when you're making a purchase and privacy.com is pci dss compliant they use military grade encryption to secure your information and they offer two-factor authentication and since they make money from merchants there is actually no cost to you so go sign up today you will get five bucks for free at privacy.com forward slash linus that's privacy.com forward slash linus so thanks for watching guys see ya
Info
Channel: Linus Tech Tips
Views: 3,866,445
Rating: undefined out of 5
Keywords: pi-hole, ad blocking, advertisement blocking, adblockplus, adblock, ad block plus, pihole, pi hole, raspberry pi, linux, youtube ads
Id: KBXTnrD_Zs4
Channel Id: undefined
Length: 16min 3sec (963 seconds)
Published: Wed Aug 28 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.