Block Ads on your ENTIRE Network! Synology Pi-hole Setup Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to take a look at how you can configure py hole on a sonology nest now py hole is a network-wide ad blocker and basically the way that it works is it will automatically filter requests and block specific ad domains based on actual DNS resolution so that sounds really complicated but think of it like DNS requests go in and while all of them went in not all of them come out that's the easiest way to think about it so setting it up on a sonology Nas is very straightforward and we're going to take a look at that in a second but before we get to that point I have written instructions that you're going to have to follow along with because I have a Docker compos file that you're going to use which will basically configure the entire thing so we're going to jump right into it and the first thing that we're going to do we're going to have to actually SSH into arseny Nas so this is the most difficult part but bear with me here it'll make a little bit more sense in a second so if you open up the control panel what we're going to do is actually enable SSH so you can click here into terminal and then we're going to enable SSH and we can disable this when we're done but after you apply it and accept this what we're going to have to do is ssh in the easiest way to do it is by utilizing the terminal so when you launch the terminal from the start menu if you're using Windows it'll say Powershell don't worry about it it's the same thing but what we're going to do is actually log into the IP address of our Nas with our username so it'll be SSH username at and then the IP address of your Nas after that you'll have to enter in your password and we are officially connected to our Nas using SSH so I'm going to clear out this window and the first thing that we have to do is actually get the interface name which we're going to use for a Mac vland network interface so all you have to do is type in this if config command and this will make a little bit more sense in a second so you're going to see a long list of things don't get intimidated uh what we're looking for is the IP address of our Nest it's only going to exist once so for me I'm on a test Nas with a test Network right now so this is the IP address of the nas and this is the interface name so in that macvan network interface I'm going to have to use this specific name here now for you it might be different it might be e z e z is a pretty common one uh it really depends on your Nas's configuration but the important point is find the IP address and then note down this interface name because we're going to need it for the next step so the next step is going to be actually creating our macvan network interface so in order to do that you basically just have to run a individual command and have this command in the written instructions so you can copy and paste it right from there but what you're going to see is we're going to talk through a few different things here so in this parent section this is where after this equal sign this is where you're going to want to enter in that interface name after that we're going to actually have to substitute our subnet if you aren't sure what your subnet is when you find the IP address of your Nas the first three digits here that's going to be your subnet so you're going to type that in here and then it's going to be 024 at that point then you're going to have to type in your gateway now this is going to be unique to me I'm on a weird ISP router here uh but the gateway address is actually 254 normally this is1 if you aren't sure what your gateway address is take the first three digits of this IP address here do uh one so it'll end in one so for me 192168 254 one type that into a web browser and if you get your router that is your gateway so for most people it's going to be one for me you can kind of ignore that then this IP range here this is going to be the IP address of the macvan network interface that we actually are using for Pyle now the macvan network interface we are using is because there are Port conflicts so with DSM by default Port 80 is a port conflict and Port 53 might be a conflict if if you're using Sony's DNS server this avoids all of that so what we're basically doing is setting up a separate IP address that will only be used for py hole and that's what this command is doing and this right here is the IP address that you'll actually be using for it after that everything else can stay as default pH Network this is just the name of the network so after you press enter you're going to have to type in your password but then you should see a long string of numbers here and that will signify that the m fine network interface is uh created and then you can close out of this because we are done if you would like to you can disable SSH because we are now done with that so we now have to move on to the configuration of the pie hole container so what we're going to do is open up file station navigate to the docker folder and then we're going to create three total folders the first is going to be called py hole so you're going to double click into that and then you're going to create two subfolders inside of that one called DNS mask. d and the other called pie hole this is the only thing you have to do we will then utilize these folders from our Docker compos file which we'll take a look at in a second so now that that is done we are going to open up container manager and what we're going to do is quickly look at the network and what you're going to see is the Mac VLAN network interface is here so there's nothing you have to do I just wanted to show you that but what we're going to do is open up this project tab select create and then we're going to give our our container and name and then what we're going to do is just select that top level folder and this is where our Docker compos file is going to be so rather than uploading a Docker composed file we are going to create a new Docker composed file and what you can do is paste in the docker compos file from the written instructions I have and we'll quickly talk through some of this so Pyle that's just the name of the container these are the ports that Pyle will be using these are the networks that py hole will be using so pH Network this the Mac VLAN network interface pH Bridge we'll talk about in a second here the time zone you can change this time zone to be whatever time zone you're in and then the web password this the password you're going to use to access the web interface for py hole so you can change this if you'd like the only other thing I want to quickly talk through is these paths right here so these paths are on your sonology Nas so this is the folder basically that we created we wanted to the docker folder we created a subfolder named py hole inside of that we created a subfolder named py hole and a subfolder named DNS mask. same path the only thing you might have to change is the volume number if you aren't sure what volume your Docker container is created on you can open up the control panel go to shared folder and look for this uh volume if you're using something other than one you have to come in here and modify this number one to be whatever that number is other than that that the only thing I want to talk through is this py hole Bridge so by default the py hole Mac VLAN network interface we're using actually can't communicate with the nas so the nas can't communicate with the Mac VLAN network interface at all if you try and use it as the DNS server it's not going to work so we have to create a bridge network interface now this bridge network interface will only be used for the nas to communicate with the container we'll take a look in a little bit to show you an example of how this works but the idea is that we're going to go in and create this pie hole bridge and it's going to be accessible through the nas at this IP address 192.168.10.0 you will only use this IP address to communicate with the container so for example if you're using openvpn on your Nas you're hosting it on your Nas and you want to use your py hole container as the DNS server you would obviously have to modify the configuration file for openvpn but rather than using the macvan IP you are going to use this IP address right here so you really are only utilizing this for Nas two container communication we will take a look at that the final thing is this py hole Network this is just stating that we already created it it was created externally so we are good after that you can go through and you can actually create the container and what it's going to do is it's going to slowly start to pull everything down it might have to download the actual container but as soon as it does it is going to start and you're going to see that the container is started we're green here and we are green here in this network tab you're going to see that a new uh network was created and that's the py hole bridge and everything looks good here you can see it's connected to one container and that is py hole so at this point we have everything basically set up I just want to talk through how we're going to use this so what you have to do is go to the IP address of the macvan network interface forward SL admin and when you get there you will get brought to the login page so if you log in with the password that you specified in the docker compos file you will be brought to Pyle now Pyle is configured but we're not using it as our DNS server so what I want to show you is inside of this control panel here I'm just going to go to network and I'm going to manually configure a DNS server and what I want to do is I want to use that macvan network interfaces IP address and what you're going to see is as as soon as I apply these settings if I open up the package Center if we open up any of these packages that are not installed you're going to see that it's not actually going to work if you try and install it it's not going to work it's not going to be able to actually download it because those DNS queries are not actually working because the nas cannot communicate with the container but if we come in here and we modify this to be our Bridge Network's IP address what you will see is these queries are are going to start to work and if you go back and you select something different it's going to pull right up and the reason is because the nas now can communicate with that macvan network interface so that's how you would change the nas to utilize py hole you don't necessarily have to do that but that's one way that you could do it so I'm going to shift this back real quick and what we're going to do I have a test router here it's a ISP provided router nothing fancy but what I want to show you is that if we go in and we modify that router to utilize the py hole IP address as our DNS server then all of our devices will use that as a DNS server and then at that point all the DNS requests will be filtered based on our block list meaning Network wide ad blocking so the way that we're actually going to do that is I'm going to open up this um router configuration page it's very generic and it's going to be different for everybody definitely different based on whatever router you're using but I'm going to type in the IP address of that macvan network interface CU like I said you're going to use that IP address for all devices other than your Nas and as soon as I apply this if we come back to py Hole here and we go to let's say Google what you're going to see is that queries are starting to come in and if you check the query log you will see that we are actually getting a laow request for Google so that means that as of right now our network is using py hole as its DNS server So based on whatever add list you have configured this is just the default configuration you can come in here and modify uh this list you can add new list there's a bunch online I don't really have any suggestions for you you have to check that out on your own but this default list is very good uh but you can add them here and the other cool thing is you can actually add local DNS records at this point so this this is a very powerful feature um because you could basically manage all of your DNS records directly in py hole there are a bunch of other settings inside of here as well but for the most part py hole is configured and it's configured properly so that is a really quick overview on how py hole Works few things that are going to be different obviously your macvan network interface you're going to have to modify that command to make sure that you're using the correct parameters you're going to have to go in and you're also going to have to modify your DNS servers now you can modify it on the router like I did or you can modify it on individual clients so let's say you only want specific devices to utilize it you would have to update the actual DNS servers of those devices but in the written instructions I have exactly how you can do that you would just basically type in the IP address there and other than that py hole is configured and you are good to go so I'm hoping this video helped you guys out thanks for watching and I'll see you next time
Info
Channel: WunderTech
Views: 10,569
Rating: undefined out of 5
Keywords: Synology NAS Pi-hole, Synology NAS Pihole, Pihole Synology NAS, Pi-hole Synology NAS
Id: -5Fwyl73C7g
Channel Id: undefined
Length: 12min 57sec (777 seconds)
Published: Sun Feb 18 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.