Blocking Ads With A Raspberry Pi - PiHOLE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
these days as blockers are pretty common they work by using filter lists to filter out domains or subdomains that serve ads so when your browser tries to resolve a domain that's known for serving ads ads a blocker will intercept this and just return a bunch of nothing so the worst you'll get is an empty box reminding you of your Atlas browsing experience other heuristic approaches are used to block ads such as blocking images based on their size common image sizes such as 728 by 90 300 by 253 you get it these image sizes are most of the time ads so it's safe to block the lot of them there's a constant battle going on between ad blockers and ad servers to gain the upper hand in ad delivery war though the main perceives problem with ad blockers is that they'll only work on a single browser on a single device if you want to block hands across your entire network you're going to have to install an ad blocker on each browser on every single one of your devices what if what if you could employ a filter on your network to block ads instead of having to install an ad blocker on every browser on every machine you own all devices connected to your network would resolve DNS queries through this filter so all devices would be ad free let's have a look at just how this can be done right after this mount Tronics com is where you can find the neatest of hacka hardware from Wi-Fi D authors Tim old we know keystroke injectors Wi-Fi key loggers and USB protectors it is run by myself so do give it two minutes of your time you're guaranteed to like our tech Mal tronics comm link is in the description enter piehole piehole is a real clever piece of software that's lightweight and will run on pretty much anything you throw at it assuming it and running one of the supported os's though as per its name it was made with the intention of running on a Raspberry Pi because anything else is a little overkill once setup you can use your piehole as a DNS server much like an blocker it has a list of domains that serve ads quite a quite a lot of them in fact when the page tries to load resources on this list piehole will simply tell it to gtfo if you're wondering whether this will slow down your internet speeds well no no it won't perhaps it's a bit misleading to call paola filter as no real network traffic is going through it only DNS queries will go to your PI which are just a few bytes long once your device knows what IP address it's meant to contact it'll ignore your PI altogether to set up this contraption you're going to need a Raspberry Pi and a 16 gigabytes microSD card as well as some peripherals to set it up of course and a network to filter any Raspberry Pi should work fine and you have the option of connecting your R 3 PI to your network via ethernet or Wi-Fi I'm going to use Ethernet for better latency however many people seem to have no issues using Wi-Fi even on a PI 0w so by using one of those you could get your overall project cost down to a mere 10 pounds firstly you'll need to download raspbian which is the OS shuttle run on your PI it's best to use the desktop version as this just makes setup a hell of a lot easier next plug in your microSD card of choice and flash the image file to it using win32diskimager links for both of these are in the description you might want to grab a marte as this could take a little while depending on the size of SD card once done unplug and shove it in your PI and connect your peripherals as well as Ethernet setup honestly it could not be easier just open a terminal window and type in the following command exactly as you see it on-screen the Installer will warn you that it's about to transform your device into a network-wide ad locker graciously accept this warning and keep tapping through the prompts make sure to select the correct interface it's zero for white and wlan0 for wireless the upstream dns is up to you but Google Google is the standard next you get to choose the blocker lists it'll use I've recommends just keeping this on default keep on tapping through accepting the defaults as and when and before long it will finish up providing you with its IP address and admin password you might want to note these down or take a picture of them as they are quite important but now the whole thing is set up and it doesn't need anything but power and no connection so you can safely disconnect everything else now the IP address for the PI needs to remain static ie constant if this changes then it'll just create problems for us so head on over to your rooters control panel and make this change all routers are slightly different and tend to have very unintuitive interfaces so you have to figure this step out yourself I'm afraid now you're almost done you just need to change the DNS server of your network to that of the rosswood pi now unfortunately my ISP doesn't allow me to do this with the router they provide so I'll have to change that DNS server on each of my individual devices though this is a one time step so it's really not a big deal you might want to leave a backup DNS in case for whatever reason your PI goes down eight or eight or eight or eight is best as this is Google's Public DNS and and now we're done to test that everything is working correctly go to your PI's IP address and you should get this page if you can also visit other sites and don't get any dns resolution errors then everything is set up correctly I've got a few test sites here and as you can see play all does do a pretty decent job of blocking out all of those ads there are a few annoyances however one being that it won't block many text ads for example those in Google search and if you were to click one of those well you just get to DNS error of course also it won't block any YouTube ads as YouTube generally uses its domains to both serve you that ad and the video itself there is an apparent workaround to this how I vote which I will link below also remember that this is only a DNS sync Jolla it won't employ many of the heuristic approaches that adblock users that I mentioned earlier such as blocking certain image sizes that's just simply out of the scope of pie hole as for its admin panel this can be reached by visiting its IP address forward slash admin there's a few statistics that'll be visible to anyone who visits the page but you'll get a wealth of info if you log in using the admin password you saw earlier for the Nerds you can see a proportion of various query types top permitted domains clients etc in the top left you can even see your pies operating temperature and memory usage very cool you'll also get a log of every single query mades but for the security conscious this can be disabled in those settings if you have issues with piehole blocking things that shouldn't or not blocking things it should you can make those changes in the whitelist and blacklist really quite easily so will I continue using piehole yes yeah I will it simply makes life easier not having to install an adblock on every single device and also whitelist and blacklist changes are made instantaneously throughout my whole network if I like a site and I don't mind running ads on it then I can just add it to the whitelist and and I'm done and I would emphasize maintaining a whitelist ads can be annoying that's that's for sure but remember much of the time your favorite sites are only able to exist because of ads on YouTube YouTube premium is a great way to support traitors and get a zero ad experience as a bonus a portion of your YouTube premium coins are distributed amongst the creators you watch alternatively if you do want to help support this channel check out Mellotron XCOM or you can find a variety of pen testing and computer security hardware if you have a mate that's interested in computer security then why not send them the link if you like this video make sure to hit that like button subscribe if you want to see more and as always stay tuned from whacking videos have a good one
Info
Channel: Seytonic
Views: 142,212
Rating: undefined out of 5
Keywords: hacking, hack, hacker, pentester, programming, howto, tutorial, diy, make, technology, tech, adblocker, raspberry pi, raspberrypi, adblocker plus, ublocker origin
Id: XcdjlWRak2Q
Channel Id: undefined
Length: 8min 0sec (480 seconds)
Published: Wed May 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.