The Pi-Hole install EVERYONE needs!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody this is techa in this video what we're going to be doing is setting up our very own ad blocking server we're going to be setting up pie hole with some good old recursive DNS giving us an additional layer of security and privacy so just a quick bit of clarification here a DNS server is what we all use to quickly connect to various websites and domain names around the internet you've probably seen these IP addresses from some of the largest DNS providers such as Google and cloudflare the benefit to using one of their DNS servers is just overall speed there are millions of people who are constantly adding data and queries to their cache on a daily basis so basically if you're looking for maybe techa.tv your connection will ask whomever your configured name server is for the IP address of that website now pie hole here in general kind of act as a middleman that has a pretty extensive default block list of IP addresses and domain names and it will filter all of those out giving us a ad-free browsing experience now as far as name servers there's definitely a con to using some of the larger DNS providers and it's that those servers log both your general internet traffic and all of your internet history and with those logs theoretically it could put your data at risk as these servers can get attacked and some of their logs and entries could be leaked so later on in this video we're going to be setting up Unbound which will act as our very own self-hosted DNS server within Pi hole so in this case if you tried to visit techhut.tv using pie hole and Unbound it won't use other servers and it will seek out the authoritative name server for that specific domain on first connection this will take slightly longer but the data will be cached in your instance at Pi hole so it will be quicker in the future so getting started here this is a current pie hole instance I set up just to do a quick test we're going to be doing this in proxmox now you can do the this on whatever you want we're going to be doing this on Ubuntu Server so if you have a Raspberry Pi laying around that works maybe you have a Raspberry Pi alternative because you can't find any in stock or even an x86 system like this a zimba board here you can install this on just about anything but what I'm going to do real quick is do this as a container within proximox so just create a new container and run through this process so this is going to be my pie hole instance gonna give her a password here next template I'm going to pick Ubuntu Server right there you do have to go download these if you are following this specifically so I'll leave us some extra information down below next eight gigs should be fine let's go next one core is going to be fine next 5 12. all of the defaults seem to be good except for right here I want to enable DHCP let's go next and next and finish and it's really as easy as that to go ahead and set up a little Ubuntu container within proxbox you see it's already ready to go right here is our new one it's going to finish creating we see pie hole so let's go ahead and give it that a start now if you're doing this with Ubuntu Server going forward after you have Ubuntu Server installed these are your steps so I'm going to go ahead and log in here now one thing you really shouldn't do really anything is root so to switch that up you could just type in a add user and the username you want so I'm going to go Brandon give yourself a password you can skip all this stuff unless if this is like a big server with a lot of users yes and there we go and do make sure you remember to add the user that you just created which for me it's going to be branded into the sudo group so enter there we go so now I can switch users to the user I just created and now we could go ahead and update our system so we're going to want to do sudo apt update and sudo upgrade and I'm just going to select y automatically type in your password and there we go now a default install of Ubuntu Server will have a curl installed but with these containers they're super lightweight so they're missing a lot of packages so I'm going to need to go ahead and install curl because what we're going to be doing is running a curl command to install pie hole but before we do that I do want to give a big thank you to the sponsor of today's video lanode I actually have a video up on the Leno Channel where I go through most of the processes of this but in addition to that we set up our very own VPN server using pie hole on the Node this is the video right here we actually are able to use a wire guard connection to connect to lenoda as a VPN provider super fun video and it is fairly easy to set up on top of that the node is just an awesome platform for hosting your websites web services whatever it may need to be I personally host my WordPress instance on the Node for Tech cut.tv and I've hosted plenty of other things such as nexcloud Game servers such as Minecraft and bahalaime and much more you have full back and access it's easy to spin up a wide variety of distributions or you could use a huge amount of their one-click installers it just takes it a couple extra steps to spin it up as a VPN for a good secure connection so with that let's go back into our installation here and to get this up and running there's actually a nice little curl command here that you go ahead and paste in directly from piehole.net and what this will do is launch a installer for us it's going to go ahead and run some system of checks you can see our OS is supported and here we go this installer will transform your device into a network-wide ad blocker beautiful pie hole is free powered by donations and you do want to make sure that this is on a static IP with this container I believe that this is going to be on port or the IP address ending in 71 and in most cases if it's just plugged in directly to your router or whatever you should be good to go so let's continue there and for now I'm going to go ahead and just leave this on Google but like I said later on we are going to be setting this up to act as our very own DNS server so I'm going to continue and then right here Stephen Black's list is going to be perfect so that's what I just generally use the default it's a good list and do we want to install the admin interface of course we do PHP modules yes would we like to enable query logging now this is up to you if you don't want this even stored on your own server you could go and disable that for me I'm going to say yes and if you do say yes there's going to be some additional options if you want to hide domains domains and clients but still keep the logs you can for me showing everything is going to work perfectly fine and then it's going to go ahead and begin and finish up the installation process it is incredibly quick and easy to get this initially set up and running when it is done it's going to give us a little temporary password as well as our IP address to connect to but we're going to go ahead and change the IP address or change the password with a command here you can see there we are in indeed ending in 71 so get this whatever this is how you're going to be connecting to it it is HTTP to start and you can see our password is there now I'm not going to remember that we're going to quickly change that and we could do that with a pie hole command that's just pie hole Dash a dash P to change the password and you can put in whatever you want this is going to be a temporary instance for me so I could put something like sub to Tech cut as the password something that isn't very secure but something you definitely should do in addition to bringing that Bell so you do not miss future videos hit enter new password set so now we could go ahead and test and make sure that this connection is working go ahead and give this a quick Copy or open link a new tab even easier and here we go you can see our instance is up and running if we go ahead and click login that we could type in the good old phrase sub to Tech Hut login and now we have full administrator access and now theoretically if you don't want to set up a recursive DNS server and you just want this solely for the ad blocking you don't care if Google or cloudflare or whatever can see your traffic and all that you you can just use this set this up on your router or go ahead and just connect to the IP address as your DNS server locally on a device by device basis and you're good to go but what we're going to be doing here is following this guide this is the Unbound pie hole installation guide they'll have a lot of the information that I talked about in this video but explained much better than I could do so I do recommend you read through this so you get a better idea of exactly what is going on but everything you're really going to need to do this is right here so first things first we're going to want to actually install unbounce so we're going to jump back over to our terminal proxmox instance whatever you happen to be using paste that on in sudo apt install unbounds let's go ahead and hit enter and confirm that installation now at first here it is going going to fail to start up and that's because it doesn't really have a configuration yet we're going to need to set that up so let's go ahead and head down here under the section that says configure Unbound it gives you a quick list of what is going on the main thing that we're going to do is switch the port of Unbound to 5335 so it doesn't interfere with the port that a pie hole is running on so right here is where we're going to want to create this configuration file you can use whatever text editor you prefer firstly I am a good fan of uh Nano so we're going to go sudo Nano and then paste that on in obviously getting rid of the pasting errors here there you go Etsy Unbound Unbound config pie hole config so hit enter this is a new file and then all we need to do is simply copy and paste this entire text box right here give that a copy go back to proxmox and paste that on in so you give this a quick skim if you'd like to and they have a lot of really good notes so you can see specifically what all of these various settings do and we can see here the interface is going to be one two seven zero zero one and that is going to be important to remember in just a sec when we set this up within pie hole so Ctrl o output that to save and then I'm going to exit on out of there so now what we can do is go over here and restart the service that's just with a service Unbound restart command so let's go ahead and drop that on in there boom and then of course testing to see if it's operational with this did command here and there we go we can see it on the port everything is looking good to go and what we're going to do real quick is go over to pie hole and set that up in our settings so if we go over to settings we can go over to DNS and if we go over here we can get confirmation of what we're doing we're going to disable Google and then add our own here with the port 5335 so just disable the Google DNS add a custom one and input the 1270.0.1 that we saw earlier do a hashtag and then 53.35 and now all we need to do really is go down to the very bottom and save that so now when we connect to pile this should act as both our DNS server and an add blocker so just to test this out I'm going to be doing this on a device by device basis and to do this you could go into your system settings and whether if you're on Windows Mac Linux whatever it's basically the same process go over here search for DNS under Network and I'm not using ethernet so I'm actually going to go under Wi-Fi and do this go to my Wi-Fi settings and then here under ipv4 I can set a custom DNS now if you're going to go through Mac OS it's basically the same process if you search DNS in your settings it'll take you to the right place and same thing with windows so here under DNS I'm going to uncheck automatic and I'm going to put in the VIP address that goes to my Pi server so that is 192.168.0.71 and then if I apply that close this out and let's load up a website and absolutely piece of garbage website that I'm aware of is one like CNN.com and then I can tell here that there's already ads that aren't coming up so if I go back to pie hole you can see we already have a 185 queries blocked on CNN if we go down here to the query log we kind of see what's going on this is our client this is everything that's been blocked and if we go and scroll down find something that's actually okay that's one of them if we go another page we'll see a few more and you can see that that was answered by localhost 5335 meaning that is the DNS server which is ours that went ahead and answered that request for us and now let's say for example I went ahead and let's refresh this or maybe even go to another page so let's go to this page here scroll down a little bit let some content load and then head back over here to our query log and now at this point we can see that it says okay cached so next time it goes and tries to load whatever that domain name is right there the location or the IP address for the web website is in our cache so it will be much quicker than that initial query so I think we're all good we are set up and sometimes websites do that thing where it says disable your ad blocker to continue if you ever need to temporarily disable this you just quickly go to your dashboard right here right here under disable we could select that and you could disable it for 30 seconds 10 seconds whatever you need just a little tip in there if you've never used pie hole before and doing it how I did it with the actual settings on the device is a really good way to start I might make a video in the future going over how to get this all properly set up on your router so it actually is Network wide but for now the video is getting a little bit long and I'm going to end it here with all that again subscribe sub to techa as per the password which I will be deleting this and changing to something much more secure with all that I have a absolutely beautiful day and good bye
Info
Channel: TechHut
Views: 332,200
Rating: undefined out of 5
Keywords: linux, pi-hole, proxmox, server, homelab, dns
Id: xtMFcVx3cHU
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Mon Aug 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.