Blocking Ads With a 15 Year Old Computer

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you've spent basically any time on the internet you're probably well aware of how frustrating it can be to have ads just smothering the web page you're trying to browse and if you're anything like me and have a lot of different servers and other devices on your local network it can get a little bit tedious to remember all the different ip addresses well today we're going to solve both of these issues using something called pihole and we're going to run it on something you might not suspect so stick around [Music] if you're watching this video there's a really good chance that you're already familiar with pihole if not though it's a utility that basically sits between you and the dns server you want to use meaning whenever you type in something like google.com it'll ask a real dns server like 1.1.1.1 where google.com actually is returning an ip address but when your web browser tries to resolve an address for a known ad service pyhole will block that dns query pyl can do a lot of other cool things too like cache dns queries to speed up browsing function as a dhcp server operate as a local dns server so you can access your own servers from something like myserver.local and much more we won't do all of that in this video but we will set up ad blocking as well as local dns records as the name might imply it's pretty common to install pi hole onto a raspberry pi but since those are a little hard to come by currently i'm actually going to try installing this on a 15 year old mac mini that i picked up a little while back for 15 this might seem a little strange and many people watching this video understandably don't like max but this might be a useful way to give the silicon a little bit more life also i feel like i should make some sort of apple pie hole joke here but i think i'll refrain from that i had planned to also install home assistant alongside pi hole but that was going to be a bit tricky being limited to 32-bit operating systems at least until i can upgrade this to a core 2 duo the core duo inside this mac mini is far from powerful and definitely isn't efficient by today's standards but it wasn't as bad as i originally thought it might be pulling just over 20 watts at idle 20 watts isn't great but with how much raspberry pi's are selling for it might still be worth considering at least if you had one of these on hand already we'll look at comparisons a little later on in the video after we get everything set up and running before we get started i want to take just a few seconds to talk about the sponsor of this video atlas vpn has one of the best deals on the market and right now if you click the link in the description below you can get 3 years plus 3 months for free for only a dollar 83 a month having a vpn service is incredibly helpful because it can allow you to access content outside your region and it encrypts your data between you and the alice vpn servers largely protecting you from things like man-in-the-middle attacks i started using atlas vpn a few months ago and i really enjoyed how simple and fast the service is i also appreciate some of the cool features like streaming optimized servers and the ability to switch between wireguard and ipsec protocols once again you can get atlas vpn for three years plus three months for free for only a dollar 83 a month so head down to the link in the description now so you don't miss out on these savings this mac mini has a core duo clocked at 1.83 gigahertz as well as 2 gigabytes of ddr2 memory which isn't great but it should be just fine to run a headless install of debian and pyhol this mini originally came with a mechanical hard drive but i swapped that out for a 128gb ssd in my last video where i set this machine up as a retro game emulator we could use the mechanical hard drive but i wanted to save that to preserve the original operating system in that video we also set up something called refind now normally because of the efi limitations of this old mac we wouldn't be able to boot into linux installs but refine fixes that i'm not going to go into detail here so if you're curious about how that all works go check out my last video for our operating system i just downloaded debian 11 32-bit and then used blaine etcher to flash it to a usb drive from there we could just plug it in and boot from it using the refined boot manager i went through all the basic steps of installing debian deselected any desktop environment and made sure to select the ssh server so we could easily remote into it using an ssh client once finished i restarted the system and removed the install drive after debian booted up i ran su dash to operate his route and then ran apt update and upgrade to make sure everything was up to date after mistyping it once i ran this command to install the sudo and net tools utilities with net tools installed i could run ifconfig to see what the local ipv4 address was for the mac mini now you could do this a few different ways but i like to have net tools installed anyway with that all out of the way i was able to ditch the monitor mouse and keyboard and connect to the server using ssh from there i ran su-again and then ran a user mod command to add the haven user to the sudo group allowing that user to run commands as super user after logging out and back in i ran sudo who am i just to confirm that we were operating as root if you're wanting a simple install of pi hole you can easily just head over to the pi hole website and copy this curl command which is what i did but before that i also needed to make sure that i installed curl using apt install curl then it's basically as simple as copy paste enter after a few minutes we should get this screen that just lets us know that pihole is going to be a network-wide ad blocker and it also lets you know how you can support the pi hole project then as this next message suggests that's really hard to say pyhol needs to have a static ip or a dhcp reservation so that the ip doesn't change for this video i just logged into my router and set up a reservation you can either look up how to do that on your specific router or google how to set up a static ip in debian both of which are fairly simple to do next i selected cloudflare as my upstream dns and then hit yes to include the recommended ad block list and also hit yes to install the admin web server i also opted to use query logging and chose to lock everything primarily for the sake of this video after a few more minutes there was a message displayed with the address of the web ui and password rather than using this password i just created my own by hopping back into the command line and running sudo pi hole dash a dash p and then typing in my new password with that done i navigated to the url shown earlier and landed on the pi hole admin panel here you can browse a lot of these different settings and features and also see that the default add list is enabled to test it out i set up my network interface in windows to use our new pihole server as its dns but didn't confirm the setting just yet to see pi hole in action i navigated to an article on wccf tech's website and as you can see there are plenty of ads on this page then we can apply our settings to use pile instead and after a hard refresh of the page we see a lot of those ads disappear if you head over to the query log you can see all the dns queries that pile blocked it's not perfect but it's still pretty cool right now this only works on my windows machine so to make this work network wide i can log into my router settings and under dhcp i can change the dns address to our pi hole ip address now it's probably smart to use another upstream dns as the backup just in case the pi hole server crashes but now you can see that i have other local ips in the query log meaning other devices on my network at least within the dhcp scope should now be using pihole [Music] if your router doesn't allow you to change the dns server you could try disabling dhcp on your router and instead set up dhcp using pi hole i'm not going to cover that here but you should be able to find plenty of good videos talking about it another cool thing pihul can do is provide local dns records so instead of having to remember that my ubuntu server is located at 192.168.1.93 i can set up a dns record for that ip address with the domain ubuntu-server.local which is quite a bit easier to remember now i already know what a lot of you are thinking which is something along the lines of why don't you just use a raspberry pi which is a fair point a raspberry pi would be smaller more efficient and much less of a hassle to set up but right now at least when this video goes live even something like a used pi 3 model b with a power supply and small sd card could easily cost you over 50 dollars with raspberry pi 4s costing a lot more obviously the cost of power consumption is important to consider as well and i want to be clear i'm not recommending anyone go out and buy something like this old mac mini but if you already have one lying around or something similar it actually might be worth it i made this little calculator in google sheets to play around with some numbers so here we can see a few things first i have the initial cost of my mac mini as well as an estimate of a raspberry pi 3b used with a power supply and eight gigabyte sd card we can also see what the watt hours is so the mac mini pulls around 21 watts and the pi 3 is an estimated about 2 watts now over here we can type in a kilowatt hour price so i could go up to something like 30 cents per kilowatt hour but i'm going to go down to 15 cents which is sort of around an average of the u.s there's a lot of states that are pretty cheap and then some states that average a lot higher but if we were to go to something like you know 15 cents a kilowatt hour which isn't that far off from where it's at where i live and we go for one year we see that it's actually cheaper to use the mac mini versus the raspberry pi 3b now if we go up to two years for example at this price the raspberry pi starts to become a bit more cost effective however if i already owned this mac mini and i didn't spend any money on it it starts to get a little bit closer in price but this could obviously vary you know if electricity costs a lot more like 30 cents a kilowatt hour you can see that over the course of two years you're paying almost double by using this mac mini even though it was free so power consumption is something to take into account here and that's very understandable but i also think it's possible that someone who already has this mac mini even if you're paying this you know 30 cents if you only have it for a year you're paying about what you'd pay to use that raspberry pi and i have a feeling a lot of people after a year of using something like this might decide to start tinkering even more and rather than running this on the mac mini they might upgrade to some other kind of home server and run this in a docker container or something so it's it depends on what the energy cost is where you're at and also how how good of a price you can get on something like a raspberry pi 3b so hopefully this was a somewhat realistic look at costs and energy and all that stuff all right back to the script hopefully this was a fun look at some of the things you can do with pihole as well as how you could potentially repurpose an old pc like this mac mini if you'd like to see more videos like this maybe check out the video where i repurposed the same mac mini as a retro gaming emulator or where i converted an old gaming pc into a home server using unraid also don't forget to leave a like if you enjoyed the video and as always thanks for watching stay curious and i'll see you in the next one [Music] then as this mess next then as this next message is oh my gosh then as this next message message suggests [Music]
Info
Channel: Hardware Haven
Views: 118,523
Rating: undefined out of 5
Keywords: block ads, block ads free, can i run pihole on a mac, dns, home server, homelab, homeserver, mac home server, mac mini, mac server, pi hole, pi hole setup, pi-hole, pi-hole install, pi-hole setup guide, pihole, pihole guide 2022, pihole mac mini, pihole on mac, pihole setup, pihole setup guide, raspberry pi, retro mac, what can i run pihole on
Id: Zbg1M-u_l3w
Channel Id: undefined
Length: 12min 18sec (738 seconds)
Published: Tue Aug 09 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.