Again, your tutorial helps me a lot! Now I got Pi-Hole fully functional on my Synology with HA integration !!!! One thing may miss in your tutorial. Adding manually 192.168.2.2 to the DNS of the Synology so it's possible to track the NAS too. Now, I'm thinking to add a Raspberry Pi Zero for getting a second PiHole for safety :-)
Hi Lucas! Nice you got it working. Yes, .2.2 can be used to monitor Synology use, although I'm not using it myself. Was thinking a bit about that and I'm not sure what would be benefit of it. Do you have any specific reason on why you use it?
@@BeardedTinker Yes for getting an audit of the outside traffic. I found watchtower is creating more than 10000 requests per day due to my 16 containers and default setting to check every 5 minutes for update. I changed it to 6 hours (--interval 21600), this more reasonable :-) and PiHole DNS caching help to reduce outside requests.
Thank you for the comment 😄 I'm using at my setup AdGuard as I find it much better then PiHole. Haven't tested DNS over HTTPS since AdGuard has a bit of issue that it has to be either one or the other. Implementing SSL in AdGuard requires DOH but also disables possibility to use standard DNS requests. And that would be problem since not all devices I have are capable of DOH. There is probably a good reason for that, but for me it's strange that you can make for ex. DOH requests preferred but allow fallback to non-HTTPS requests. But from what I've read, it shouldn't be an issue. there is a great post on this, although it uses RaspberryPI zeor W for this. visibilityspots.org/dockerized-cloudflared-pi-hole.html
Thank you for your comment Laurence!! You are correct - but partially, File Editor is what is in hass.io, but this is (was) for Home Assistant CORE (Docker version) - and full name is HASS-Configurator github.com/danielperna84/hass-configurator Nevertheless thank you for clarifying this!
You can install Portainer - th-cam.com/video/jtVelxopKTM/w-d-xo.html - it auto updates all Docker containers. There is also option to run Watchtower jsust to update one specific image, but I've never tried/used it. Or you can run couple of commands: docker pull pihole/pihole docker rm -f pihole and last is "docker run..." command you used earlier. BUT be careful, you have to pull image first (first command) because when you execute rm - pihole you will lose DNS resolving until you up run last command.
Hi one more question if I may. I have unifi netwerk and setting up a IoT netwerk. But I want to block adds on the IoT netwerk. I cant get it to work with all the help of google and youtube. I have followed different tutorials on firewall rules and have them set up, but no result. Maybe it has to do with the brigde created in this video? or any other ideas? I use this setup now for over 2 years without any problems, thats very great!
@BeardedTinker - super video, great instructions. I have it up and running in my network. One question, how do you update/upgrade? I have found some instructions on the pihole docker documentation, but with all the settings (for network, config files, etc) - how would I go about it in order to upgrade? I just stop-delete the existing container, re-download the image, re-do the settings and launch it? I don't want to mess it up.
This should be easy BUT please make sure that in local folders you have configuration files (just browse /volume1/docker/pi-hole and see if it and sub-folders are empty or not). You can back them up/copy somewhere to be on the safe side. Easiest way to update would be to run something like this from terminal: sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once pihole (or whatever the name of the Docker container is - it must match)
Hi Jon! I'm using AdGuard as I find it much better then PiHole, but that's just my 2 cents. PiHole should work on RPi zero. There is an (old) post on Adafruit that looks ok for setting it up learn.adafruit.com/pi-hole-ad-blocker-with-pi-zero-w But at the end it will all come to how many devices and how many requests PiHole gets as DNS resolver and AdBlocker. Oh and in my home setup, I don't use any AdBlocekr/DNS resolver for Synology - just standard public DNS servers for name resolving.
Hello! Thanks again for the video! This worked like a charm previously, but I made some network changes that moved the subnet of my NAS, and was wondering if this is possible. I left all of my networking equipment on the 192.168.1.x subnet, and moved the Synology NAS hosting Home Assistant/Pi-Hole (as a backup DNS) to the 192.168.10.x subnet. Is it possible to use this method to achieve the Pi-Hole to be at its previous address (192.168.1.6) while the Synology NAS is no longer on that subnet but instead is on the 192.168.10.x subnet? It's not the end of the world if it can't, it's being used as a backup anyhow. I can live with it on the 192.168.10.x subnet if need be. Thanks!
Hi Craig and thank you for your comment! Just have to say - wow, that's a nice brain teaser you got there... It should be possible to make it. But also I think that there could be some potential problems although I can't think of what at the moment. I'm not sure what could be potential problem of having macvlan interface on different subnet - in theory, this should work. Unfortunately, can't test it currently.
@@BeardedTinkerThanks for the reply! I don't know enough about how it all works to test that out, so I can keep it on the same subnet it's no issue. Or just move the NAS back to where it was. Either one isn't a huge deal :)
Hi, love all the tutorials you have posted. I have a problem setting up Pihole. I have followed this tutorial 3 times but every time all goes great until I try to connect to the pihole server in the web browser and get this site can't be reached. I can ping the pihole IP address ok. I have used all the same settings as in the video so my pihole server is 192.168.1.199. I have also tried using a different IP for the server but no luck. There are no errors in the log files. Any help would be much appreciated.
Haven't used PiHole in a whole and I know that it's now on new major release. Just to check first some other things - what is IP address of your network - is it also 192.168.1.x ? From what IP address are you trying to ping it? if you use terminal to connect to host (Synology) can you ping 192.168.2.2 ?
@@BeardedTinker Thanks for the super fast reply. Yes my network IP is 192.168.1.x. I found I had an IP conflict with an iPhone on 192.168.1.199. I have recreated the pihole network, bridge and container again using 192.168.1.119. I still have the same issue but I cannot ping 192.168.1.119 from my pc. Using the terminal connected to my synology I can ping 192.168.2.2
I managed to get onto the pihole admin using my synology IP address and the port used by pihole instead of port 80. I couldn't get it working properly so I have decided to remove it and come back to it at a later date.
I moved on to the Adguard tutorial and had exactly the same issue. I have found what was causing the problem. I have 2 lan ports bonded. I was using bond0 to create the network. I deleted the bond and used eth0 and I can now get to the web interface ok.
@@pfrench69 sorry, long long, very long day at work. I presume that you did check you ethernet interface. I'm using bound network interfaces and AdGuard works with it. Are both your ports connected (I think they are but just checking).
When connected via ssh trying to create the mac vlan my bond has a space in the name for parent. What would the syntax be for that? Everything i have tried so far does not work. Ty
i followed this guide like half a year ago and went fine untill couple of days ago. Since then the service was stopped. I tried to install everything again, so deleted the docker image of pihole and start from scratch. Still I don't get the pihole server up and running again. It says "DNS service is not running" and I don't know what to do, have googled it, but with no succes.
@@BeardedTinker Hi, thanks for your reply. No i haven't installed anything. I only followed your great video instructions and it worked like a charm for half a year. No need to change anything.
@@andrep5483 very hard to debug. Did you maybe change something in network preferences, add bridge network, second lan adapter? Did you upgrade PiHole maybe? Didn't track if anything changed there? Can you access it on any IP address (macvlan or direct from PC).
@@BeardedTinker Hi, i have auto updates from watchtower i think. So i restarted everything again, while taken care of deleting everything, even the macvlan. Now it works again like a charm! So nice to have it back. Couple of strange things I have to dig into, like configurator file seems gone too in HA, but the pihole regs still update... i look into that...
Hi i am trying to configure pihole on my synology nas but with a separate ip adress than the synology so i can use it also with synology vpn, how can i bridge the 192.168.1.199 to 192.168.2.2 without home assistant?
Home assistant is not necessary for this. If you are accessing PiHole from your network, it should be available to .199 address - as long as you created macvlan network. 192.168.2.2 should only be needed if you want to access PiHole from same physical Ethernet adapter where PiHole is (Synology for example).
BeardedTinker Yes, but my synology nas ip is 192.168.1.250 and I want the Pihole of docker to have the ip: 192.168.1.199. I already created a MacVlan that has ip range on 192.168.1.199 but when i try to acces that ip for the pihole it doesn’t connect... Also thank you for answering 🙂🙏
If you also created pihole-bridge connection and added both macvlan and this new bridge connection to PiHole docker network, that should be it. But remember that you will then be able to access it at 192.168.2.2 only from Synology. All other devices on the network should see it still at 192.168.1.199 And as I said, if you don't want to use PiHole for filtering of Synology traffic, you can skip this step completely.
I'm guessing you wont see this, but it's a longshot. I'm having issues getting the pi hole to work. I get that the IP is rejecting the connection. I'm not sure how to configure the for Pi Hole, because of the different IP's from the NAS' host IP. I've been looking through different posts and I can't seem to find anything about it... I'm really new to this stuff, so I dont know what to look for either.. (everything else is working great, it's pulling data into HA for the sensors etc, just cant figure out the )
+Mezhona, I try to answer everyone, but not all of my answers are helpful 😂 Two questions - are you using SSL for https sessions with Home Assistant or not? If you are using and Pi Hole does not, than this is known limitation and you can't mix https host with with http. And second question is, what IP address are you using to try to load it up in iFrame? Same as the one you used for sensor, or the address you use to access it from notebook/phone? Did you try to use "both" ? Create one iFrame with your normal IP address (one you use to access it from notebook for ex). And second one, try using your synology/PiHole bridge IP address. One of them should (I think) work. But - this last comment of mine is just wilde guess - I don't see reason why it wouldn't work, although, everything is possible.
@@BeardedTinker what do you mean? I only set the ip bridge to either the config.yml and on the dns setting in the synology. But i don't see devices who enteres the network automatically using pi hole..
That's true, because on your ISP router you need to replace IP addresses of the DNS server (primary DNS) with IP address of the PiHole. Also, if you are using DHCP to lease addresses to your devices - you need to change DNS server address there too with one from PiHole. Without it, all devices will still use public DNS servers and will skip checking with PiHole.
@@BeardedTinker It worked by setting the static ip to the pi hole ip on my router ! thanks for explaining! But i have one more question.. is it better to use your bridge ip? or the one you set in the environement in your dns router settings?
Hmm, my answer is gone. Can you give any additional information? When did you get this error? When creating network? Starting PiHole? Also, in what device are you trying to install this - Synology or some other device?
@@BeardedTinker I'm trying to install pihole on a Synology DS418play. I get this error during SSh session @7:04 creating the network interface. Thanks for your help.
@@killer_x_treme TNX! Did you run "ip addr" to check what is your port? I tried to google it any only see this error when trying to create bridge network under Windows. I've run this couple of times so far on various Synology devices and never got this error. Also, can you make sure that you specified -d macvlan, some reports suggest people forget this option, but I believe that you would get different error without it.
Dobar dan! I have configured the docker ip address as you instructed. Everything works fine but now I want to add another ip address to the docker interface for another docker image. Is this actually possible? I want to use multiple ip addresses as for example: sudo docker network create -d macvlan --subnet=192.168.2.0/24 --ip-range=192.168.2.200/24 --gateway=192.168.2.254 -o parent=eth0 pihole_network sudo docker network create -d macvlan --subnet=192.168.2.0/24 --ip-range=192.168.2.210/24 --gateway=192.168.2.254 -o parent=eth0 powerdns_network Hvala!
Hej pozdrav! Unfortunately, of I'm not mistaken, you can only have one macvlan network. What you could (potentially) do is expand the range of initial address range in macvlan and then use different IP address for each container. I did it only once, for testing. But can't 100% be sure how I did it. Even think somewhere in the comments I wrote steps for that. Sorry if I wasn't much of a help.
If you want to go in rabbit-hole of Docker network, there is one good post here: skife.org/2016/03/28/docker-real-network.html This will allow yo to assign different IP (but not Docker 172.x range) to every container. A bit long post, but from what I've seen it manageable.
Hello this tutorial is wonderful. You really came with a solution on ports shared by the NAS. Have you found a solution to setup lancache.net on docker synology? I believe that we should be making the mclavan too, but I fail to setup 4 IPs to make functional the docker. If you are up to the challenge many people will greatly appreciate your expertise!
Thank you very much for the comment!! I haven't - did look after you posted this to see how this could be setup. And it should be doable, following same principals like setting up PiHole or AdGuard. But never tried it.
Hello BeardedTinker, Very nice job, thank you for your videos. I install and setup everything. But when I try to run piHole, I get the message "Docker API failed Check Docker-Logbook for more info" Can you help me please?
Hey Negrito! Thanks for your comment... I've never seen this error before. Googled a bit and one of the possible issues I've found is possible port collision. Sorry, but nothing else pops in my mind. You can try checking logs for Docker (can be done in Synology via Docker app - last tab is logs).
sudo docker network create -d macvlan --subnet=192.168.0.0/24 --ip-range=192.168.0.123/32 --gateway=192.168.0.1 -o parent=bond0 pihole_network i use this but how to access the pihole dns?
It should be on 192.168.0.123 if everything is working correctly. You can test it from any device on your network except your Docker host - due to the nature of this, it can't resolve route to different IP address on same physical interface. That's why you would need additional pihole-bridge network (in my example 192.168.2.2)
Thanks for asking Natty! Unfortunately I'm no good in Docker compose. Never used it. I either do pure command line or use Docker GUI in Synology. BUT what I've seen from compose documentation there is a way to add two network ports and and attach container to both of them. Following would be command line for creating and starting container container - BUT with only one network attached: sudo docker run -itd --name="pi-hole" --restart=always --net=pihole_network --net=pi_hole_brige -e TZ=Europe/Zagreb -e WEBPASSWORD=1q2w3e4r5t -e ServerIP=192.168.1.199 -v /volume1/docker/pi-hole/etc-pihole/:/etc/pihole/ -v /volume1/docker/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/ --dns=127.0.0.1 --dns=8.8.8.8 pihole/pihole:latest Can't test now, but I think following could work to get both networks attached to container: sudo docker create -it --name="pi-hole" --restart=always --net=pihole_network -e TZ=Europe/Zagreb -e WEBPASSWORD=1q2w3e4r5t -e ServerIP=192.168.1.199 -v /volume1/docker/pi-hole/etc-pihole/:/etc/pihole/ -v /volume1/docker/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/ --dns=127.0.0.1 --dns=8.8.8.8 pihole/pihole:latest And then attach other network with: sudo docker network connect pi_hole_brige pihole And lastly start it with: sudo docker start pihole If you need I can try to write docker network create statement for pihole_bridge too. I apologise I couldn't help more.
Followed your guide, but when I use 192.168.0.199 as a DNS outside the synology (my PC), it says it cant reach DNS, however I can reach the admin panel on this ip: 192.168.0.199. HA recognised it, and it sees it, but I can't use it for what it is. (192.168.0.1 is the current LAN gateway)
@@Merwenus I knew that messing with DNS and PiHole would backfire :) OK, so let me just list here what would be steps and see if everything is OK. Pinging from PC works, so DNS server can be accessed. HA can see and it talks with PiHole Synology? Can you see it/ping/get DNS resolves? Can you paste here PLS output from following command on PC: ipconfig -all Just this part is needed: IPv4 Address. . . . . . . . . . . : 192.168.1.217 (Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : 8. Noveber 2019. 20:12:48 Lease Expires . . . . . . . . . . : 9. November 2019. 18:12:48 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.11 DNS Servers . . . . . . . . . . . : 192.168.1.199 8.8.4.4
@BullFrog Sorry for late replay - Somehow it was held in "Likely SPAM". From this side everything looks OK. PC is getting address and DNS info, it has gateway properly configured. I presume that DNS request ports are default in PiHole? Did you restart Synology after installing PiHole? Did PC address show up in Pi-Hole list of devices at any time? And of course, you can try Adguard Home - I love it more and it was less of a problem to get up and running. Video for it will be out today (a bit later).
Thank you for video again! I have question about sidebar. I see that you have: panel_: esphome: title: 'ESP Home' url: '192.168.1.5:6052' icon: mdi:raspberry-pi But I can't open and have got following link: 192.168.1.5:8123/esphome
Hej dobar dan! Kako si? I hope that you are fine during this Corona crisis in Hrvatska. When you can and have time ofcourse could you please add a video for pi-hole 5.0 docker installation when it’s available? Thank you in advance!
Hej Sil! Nije loše! :) Sorry it took me a bit longer for this answer. I still haven't tried new version of PiHole but I did browse around a bit and it looks like new version should be able to install with same instructions - creating macvlan, bridge network and using same Docker command. I'm not using it myself as I find AdGuard much better in what it does. Also, since both installations (AdGuard and PiHole) are using macvlan I've noticed a lot of people having issues due to not following instructions completely (for ex. failing to verify exact Ethernet port or using wrong IP subnet, etc), those videos have created more negative reactions then positive. That's why I'll probably not be doing updated video on this one.
BeardedTinker Hej BT, Hvala for your reply. Nadam se da je sve dobro. I can confirm that with your previous instructions pi-hole 5 was installed without any issues. I can confirm that the per client blocking is working fine. I will check online for adguard.
Is there also a way to show hostnames instead of IP's (for DHCP clients) in Pi-Hole? Thank you for the great step by step guide, had it running on same IP as my Synology, but this is much better!
Hmm, with DHCP it's a bit harder. In Settings - Client settings - there is option to configure clients. There you can use MAC address to identify specific devices.
@@SmeetsDieter I was looking at AdGuard :) Sorry for that one. But, no this was not in DHCP of AdGuard but other setting. Don't have PiHole running anymore as I find AdGuard much more user friendly so can't look for it there. BUT I presume that it should have something similar.
@@BeardedTinker Okay thank you, will look into that also. Can you also assist us on how to get multiple containers running, when I only have one running this works but when I want to create another macvlan IP, I get an error: Error response from daemon: failed to allocate gateway (192.168.10.1): Address already in use Thanks again!
Hello, again! I have been following your tutorials religiously and i am learning a lot of things. Thank you for all the time you take for us it's really appreciated! Obviously I also have something that is not working with this pi-hole install. It keeps closing and re opening every 5 minutes or so... here is the portainer logs for pi-hole pastebin.com/KKPGDPrX hope you
It also messes up with HA, i ket all kinds of errors when pihole is on now... :( look at all these: pastebin.com/fcsrHK0r everything was working now... i dont understant what could have broken so many things at once during this install please help me get back to a viable state thanks
Thanks for putting this together! I like that you explain the motivation behind the settings and point out alternatives.
Glad it was helpful! Thank you for your comment!!
Again, your tutorial helps me a lot! Now I got Pi-Hole fully functional on my Synology with HA integration !!!!
One thing may miss in your tutorial. Adding manually 192.168.2.2 to the DNS of the Synology so it's possible to track the NAS too.
Now, I'm thinking to add a Raspberry Pi Zero for getting a second PiHole for safety :-)
Hi Lucas! Nice you got it working. Yes, .2.2 can be used to monitor Synology use, although I'm not using it myself. Was thinking a bit about that and I'm not sure what would be benefit of it.
Do you have any specific reason on why you use it?
@@BeardedTinker Yes for getting an audit of the outside traffic. I found watchtower is creating more than 10000 requests per day due to my 16 containers and default setting to check every 5 minutes for update. I changed it to 6 hours (--interval 21600), this more reasonable :-) and PiHole DNS caching help to reduce outside requests.
Excellent video and wonderful explanation. Do you know how we can use a Pihole and also a DOH on the same synology. Perhaps a cloudfared docker?
Thank you for the comment 😄
I'm using at my setup AdGuard as I find it much better then PiHole. Haven't tested DNS over HTTPS since AdGuard has a bit of issue that it has to be either one or the other. Implementing SSL in AdGuard requires DOH but also disables possibility to use standard DNS requests. And that would be problem since not all devices I have are capable of DOH.
There is probably a good reason for that, but for me it's strange that you can make for ex. DOH requests preferred but allow fallback to non-HTTPS requests.
But from what I've read, it shouldn't be an issue. there is a great post on this, although it uses RaspberryPI zeor W for this.
visibilityspots.org/dockerized-cloudflared-pi-hole.html
If anyone is confused like I was, it's now called File Editor instead of Configurator.
Thank you for your comment Laurence!!
You are correct - but partially, File Editor is what is in hass.io, but this is (was) for Home Assistant CORE (Docker version) - and full name is HASS-Configurator github.com/danielperna84/hass-configurator
Nevertheless thank you for clarifying this!
How to update a Pi on a docker to the new version would be very nice?
You can install Portainer - th-cam.com/video/jtVelxopKTM/w-d-xo.html - it auto updates all Docker containers.
There is also option to run Watchtower jsust to update one specific image, but I've never tried/used it.
Or you can run couple of commands:
docker pull pihole/pihole
docker rm -f pihole
and last is "docker run..." command you used earlier.
BUT be careful, you have to pull image first (first command) because when you execute rm - pihole you will lose DNS resolving until you up run last command.
Hi one more question if I may. I have unifi netwerk and setting up a IoT netwerk. But I want to block adds on the IoT netwerk. I cant get it to work with all the help of google and youtube. I have followed different tutorials on firewall rules and have them set up, but no result. Maybe it has to do with the brigde created in this video? or any other ideas? I use this setup now for over 2 years without any problems, thats very great!
MACVLAN is more of a hack than good network practice - used to make something work that normally shouldn't. This could be the problem you're having.
@BeardedTinker - super video, great instructions. I have it up and running in my network. One question, how do you update/upgrade? I have found some instructions on the pihole docker documentation, but with all the settings (for network, config files, etc) - how would I go about it in order to upgrade? I just stop-delete the existing container, re-download the image, re-do the settings and launch it? I don't want to mess it up.
This should be easy BUT please make sure that in local folders you have configuration files (just browse /volume1/docker/pi-hole and see if it and sub-folders are empty or not). You can back them up/copy somewhere to be on the safe side.
Easiest way to update would be to run something like this from terminal:
sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once pihole (or whatever the name of the Docker container is - it must match)
Hi I am thinking of buying myself a Synology NAS, and build my own pihole with a raspberry zero. Is using the Synology as NAS and pihole worth it?
Hi Jon! I'm using AdGuard as I find it much better then PiHole, but that's just my 2 cents. PiHole should work on RPi zero. There is an (old) post on Adafruit that looks ok for setting it up learn.adafruit.com/pi-hole-ad-blocker-with-pi-zero-w
But at the end it will all come to how many devices and how many requests PiHole gets as DNS resolver and AdBlocker.
Oh and in my home setup, I don't use any AdBlocekr/DNS resolver for Synology - just standard public DNS servers for name resolving.
Hello! Thanks again for the video! This worked like a charm previously, but I made some network changes that moved the subnet of my NAS, and was wondering if this is possible.
I left all of my networking equipment on the 192.168.1.x subnet, and moved the Synology NAS hosting Home Assistant/Pi-Hole (as a backup DNS) to the 192.168.10.x subnet.
Is it possible to use this method to achieve the Pi-Hole to be at its previous address (192.168.1.6) while the Synology NAS is no longer on that subnet but instead is on the 192.168.10.x subnet? It's not the end of the world if it can't, it's being used as a backup anyhow. I can live with it on the 192.168.10.x subnet if need be. Thanks!
Hi Craig and thank you for your comment!
Just have to say - wow, that's a nice brain teaser you got there...
It should be possible to make it. But also I think that there could be some potential problems although I can't think of what at the moment. I'm not sure what could be potential problem of having macvlan interface on different subnet - in theory, this should work. Unfortunately, can't test it currently.
@@BeardedTinkerThanks for the reply! I don't know enough about how it all works to test that out, so I can keep it on the same subnet it's no issue. Or just move the NAS back to where it was. Either one isn't a huge deal :)
Hi, love all the tutorials you have posted. I have a problem setting up Pihole. I have followed this tutorial 3 times but every time all goes great until I try to connect to the pihole server in the web browser and get this site can't be reached.
I can ping the pihole IP address ok. I have used all the same settings as in the video so my pihole server is 192.168.1.199. I have also tried using a different IP for the server but no luck.
There are no errors in the log files. Any help would be much appreciated.
Haven't used PiHole in a whole and I know that it's now on new major release. Just to check first some other things - what is IP address of your network - is it also 192.168.1.x ? From what IP address are you trying to ping it? if you use terminal to connect to host (Synology) can you ping 192.168.2.2 ?
@@BeardedTinker Thanks for the super fast reply. Yes my network IP is 192.168.1.x. I found I had an IP conflict with an iPhone on 192.168.1.199. I have recreated the pihole network, bridge and container again using 192.168.1.119. I still have the same issue but I cannot ping 192.168.1.119 from my pc. Using the terminal connected to my synology I can ping 192.168.2.2
I managed to get onto the pihole admin using my synology IP address and the port used by pihole instead of port 80. I couldn't get it working properly so I have decided to remove it and come back to it at a later date.
I moved on to the Adguard tutorial and had exactly the same issue. I have found what was causing the problem. I have 2 lan ports bonded. I was using bond0 to create the network. I deleted the bond and used eth0 and I can now get to the web interface ok.
@@pfrench69 sorry, long long, very long day at work.
I presume that you did check you ethernet interface. I'm using bound network interfaces and AdGuard works with it. Are both your ports connected (I think they are but just checking).
When connected via ssh trying to create the mac vlan my bond has a space in the name for parent. What would the syntax be for that? Everything i have tried so far does not work. Ty
Can you paste here what you get when you query interfaces?
i followed this guide like half a year ago and went fine untill couple of days ago. Since then the service was stopped. I tried to install everything again, so deleted the docker image of pihole and start from scratch. Still I don't get the pihole server up and running again. It says "DNS service is not running" and I don't know what to do, have googled it, but with no succes.
Do you maybe have VMM running or installed it recently?
@@BeardedTinker Hi, thanks for your reply. No i haven't installed anything. I only followed your great video instructions and it worked like a charm for half a year. No need to change anything.
@@andrep5483 very hard to debug. Did you maybe change something in network preferences, add bridge network, second lan adapter?
Did you upgrade PiHole maybe? Didn't track if anything changed there? Can you access it on any IP address (macvlan or direct from PC).
@@BeardedTinker Hi, i have auto updates from watchtower i think. So i restarted everything again, while taken care of deleting everything, even the macvlan. Now it works again like a charm! So nice to have it back. Couple of strange things I have to dig into, like configurator file seems gone too in HA, but the pihole regs still update... i look into that...
@@andrep5483 glad you got it working again.
Check that configurator hasn't changed package name.
Hi i am trying to configure pihole on my synology nas but with a separate ip adress than the synology so i can use it also with synology vpn, how can i bridge the 192.168.1.199 to 192.168.2.2 without home assistant?
Home assistant is not necessary for this. If you are accessing PiHole from your network, it should be available to .199 address - as long as you created macvlan network.
192.168.2.2 should only be needed if you want to access PiHole from same physical Ethernet adapter where PiHole is (Synology for example).
BeardedTinker Yes, but my synology nas ip is 192.168.1.250 and I want the Pihole of docker to have the ip: 192.168.1.199. I already created a MacVlan that has ip range on 192.168.1.199 but when i try to acces that ip for the pihole it doesn’t connect... Also thank you for answering 🙂🙏
If you also created pihole-bridge connection and added both macvlan and this new bridge connection to PiHole docker network, that should be it.
But remember that you will then be able to access it at 192.168.2.2 only from Synology. All other devices on the network should see it still at 192.168.1.199
And as I said, if you don't want to use PiHole for filtering of Synology traffic, you can skip this step completely.
BeardedTinker thank you sooo much it worked!! 😃😃
I'm guessing you wont see this, but it's a longshot.
I'm having issues getting the pi hole to work. I get that the IP is rejecting the connection.
I'm not sure how to configure the for Pi Hole, because of the different IP's from the NAS' host IP.
I've been looking through different posts and I can't seem to find anything about it... I'm really new to this stuff, so I dont know what to look for either..
(everything else is working great, it's pulling data into HA for the sensors etc, just cant figure out the )
+Mezhona, I try to answer everyone, but not all of my answers are helpful 😂
Two questions - are you using SSL for https sessions with Home Assistant or not? If you are using and Pi Hole does not, than this is known limitation and you can't mix https host with with http.
And second question is, what IP address are you using to try to load it up in iFrame? Same as the one you used for sensor, or the address you use to access it from notebook/phone? Did you try to use "both" ? Create one iFrame with your normal IP address (one you use to access it from notebook for ex). And second one, try using your synology/PiHole bridge IP address.
One of them should (I think) work.
But - this last comment of mine is just wilde guess - I don't see reason why it wouldn't work, although, everything is possible.
Hello i installed pihole through docker , that worked but i don't think pihole is blocking any of my ads .. something i overlooked?
Did you follow steps and configured either your router to forward all DNS requests to PiHole, or changed network settings for your devices?
@@BeardedTinker what do you mean? I only set the ip bridge to either the config.yml and on the dns setting in the synology. But i don't see devices who enteres the network automatically using pi hole..
That's true, because on your ISP router you need to replace IP addresses of the DNS server (primary DNS) with IP address of the PiHole. Also, if you are using DHCP to lease addresses to your devices - you need to change DNS server address there too with one from PiHole. Without it, all devices will still use public DNS servers and will skip checking with PiHole.
@@BeardedTinker It worked by setting the static ip to the pi hole ip on my router ! thanks for explaining! But i have one more question.. is it better to use your bridge ip? or the one you set in the environement in your dns router settings?
@@samvanst great that you got everything setup. You should just use DNS router settings. That should be easiest to do and get all devices setup.
Does this work on raspberry pi4?
PiHole should work on Pi without any issues.
@@BeardedTinker I mean home assistant AND pihole
Again , yes. Depends on the installation you have (HassOS Vs Docker), but in any case it should work. Easiest way is to use on HassOS as Add-on.
Error response from daemon: plugin not found. What am I missing here.
Hmm, my answer is gone. Can you give any additional information? When did you get this error? When creating network? Starting PiHole?
Also, in what device are you trying to install this - Synology or some other device?
@@BeardedTinker I'm trying to install pihole on a Synology DS418play. I get this error during SSh session @7:04 creating the network interface. Thanks for your help.
@@killer_x_treme TNX! Did you run "ip addr" to check what is your port? I tried to google it any only see this error when trying to create bridge network under Windows.
I've run this couple of times so far on various Synology devices and never got this error.
Also, can you make sure that you specified -d macvlan, some reports suggest people forget this option, but I believe that you would get different error without it.
@@BeardedTinker yes I ran the ip addr command, I have a bonded conncetion idetified as bond0 not eth0.
Tried few things but couldn't replicate error you get. Sorry I can't help you on this one.
Dobar dan! I have configured the docker ip address as you instructed. Everything works fine but now I want to add another ip address to the docker interface for another docker image. Is this actually possible? I want to use multiple ip addresses as for example:
sudo docker network create -d macvlan --subnet=192.168.2.0/24 --ip-range=192.168.2.200/24 --gateway=192.168.2.254 -o parent=eth0 pihole_network
sudo docker network create -d macvlan --subnet=192.168.2.0/24 --ip-range=192.168.2.210/24 --gateway=192.168.2.254 -o parent=eth0 powerdns_network
Hvala!
Hej pozdrav! Unfortunately, of I'm not mistaken, you can only have one macvlan network. What you could (potentially) do is expand the range of initial address range in macvlan and then use different IP address for each container. I did it only once, for testing. But can't 100% be sure how I did it.
Even think somewhere in the comments I wrote steps for that.
Sorry if I wasn't much of a help.
Nema problema! Thank you for your time. Pozdrav iz Paga (Povljana)
If you want to go in rabbit-hole of Docker network, there is one good post here: skife.org/2016/03/28/docker-real-network.html
This will allow yo to assign different IP (but not Docker 172.x range) to every container. A bit long post, but from what I've seen it manageable.
@@BeardedTinker Hvala again! When I have read it and managed to get it working I will update you. Enjoy your day! Pozdrav iz Nizozemska danas.
Hello this tutorial is wonderful. You really came with a solution on ports shared by the NAS. Have you found a solution to setup lancache.net on docker synology? I believe that we should be making the mclavan too, but I fail to setup 4 IPs to make functional the docker. If you are up to the challenge many people will greatly appreciate your expertise!
Thank you very much for the comment!!
I haven't - did look after you posted this to see how this could be setup. And it should be doable, following same principals like setting up PiHole or AdGuard.
But never tried it.
Hello
BeardedTinker, Very nice job, thank you for your videos. I install and setup everything. But when I try to run piHole, I get the message "Docker API failed Check Docker-Logbook for more info" Can you help me please?
Hey Negrito! Thanks for your comment... I've never seen this error before. Googled a bit and one of the possible issues I've found is possible port collision. Sorry, but nothing else pops in my mind. You can try checking logs for Docker (can be done in Synology via Docker app - last tab is logs).
I'm getting the same error. Were you able to figure out the issue?
Do you see anything in log file in Docker?
@@BeardedTinker I'm seeing an error that says "failed to create the macvlan port: device or resource busy"
@@BeardedTinker I figured it out. My network was ovs_eth0 instead of just eth0 Thanks for your help!
where to find the subnet
sudo docker network create -d macvlan --subnet=192.168.0.0/24 --ip-range=192.168.0.123/32 --gateway=192.168.0.1 -o parent=bond0 pihole_network
i use this but how to access the pihole dns?
It should be on 192.168.0.123 if everything is working correctly. You can test it from any device on your network except your Docker host - due to the nature of this, it can't resolve route to different IP address on same physical interface. That's why you would need additional pihole-bridge network (in my example 192.168.2.2)
Thank You for your explanation.
Can you please add the docker-compose.yml file ?
Thanks for asking Natty! Unfortunately I'm no good in Docker compose. Never used it. I either do pure command line or use Docker GUI in Synology.
BUT what I've seen from compose documentation there is a way to add two network ports and and attach container to both of them.
Following would be command line for creating and starting container container - BUT with only one network attached:
sudo docker run -itd --name="pi-hole" --restart=always --net=pihole_network --net=pi_hole_brige -e TZ=Europe/Zagreb -e WEBPASSWORD=1q2w3e4r5t -e ServerIP=192.168.1.199 -v /volume1/docker/pi-hole/etc-pihole/:/etc/pihole/ -v /volume1/docker/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/ --dns=127.0.0.1 --dns=8.8.8.8 pihole/pihole:latest
Can't test now, but I think following could work to get both networks attached to container:
sudo docker create -it --name="pi-hole" --restart=always --net=pihole_network -e TZ=Europe/Zagreb -e WEBPASSWORD=1q2w3e4r5t -e ServerIP=192.168.1.199 -v /volume1/docker/pi-hole/etc-pihole/:/etc/pihole/ -v /volume1/docker/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/ --dns=127.0.0.1 --dns=8.8.8.8 pihole/pihole:latest
And then attach other network with:
sudo docker network connect pi_hole_brige pihole
And lastly start it with:
sudo docker start pihole
If you need I can try to write docker network create statement for pihole_bridge too.
I apologise I couldn't help more.
BeardedTinker thank you!!🙏
Followed your guide, but when I use 192.168.0.199 as a DNS outside the synology (my PC), it says it cant reach DNS, however I can reach the admin panel on this ip: 192.168.0.199. HA recognised it, and it sees it, but I can't use it for what it is. (192.168.0.1 is the current LAN gateway)
+BullFrog can you try na ping from your PC 192.168.0.199?
@@BeardedTinker yup, I can ping from PC and Synology too. But windows 10 says DNS provider does not answer.
@@Merwenus I knew that messing with DNS and PiHole would backfire :)
OK, so let me just list here what would be steps and see if everything is OK.
Pinging from PC works, so DNS server can be accessed.
HA can see and it talks with PiHole
Synology? Can you see it/ping/get DNS resolves?
Can you paste here PLS output from following command on PC:
ipconfig -all
Just this part is needed:
IPv4 Address. . . . . . . . . . . : 192.168.1.217 (Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 8. Noveber 2019. 20:12:48
Lease Expires . . . . . . . . . . : 9. November 2019. 18:12:48
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.11
DNS Servers . . . . . . . . . . . : 192.168.1.199
8.8.4.4
@@BeardedTinker Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : lan
IPv4 Address. . . . . . . . . . . : 192.168.0.115(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 2019. november 8., péntek 12:33:54
Lease Expires . . . . . . . . . . : 2155. december 16., kedd 4:28:48
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.199
@BullFrog Sorry for late replay - Somehow it was held in "Likely SPAM".
From this side everything looks OK. PC is getting address and DNS info, it has gateway properly configured.
I presume that DNS request ports are default in PiHole?
Did you restart Synology after installing PiHole? Did PC address show up in Pi-Hole list of devices at any time?
And of course, you can try Adguard Home - I love it more and it was less of a problem to get up and running. Video for it will be out today (a bit later).
Thank you for video again! I have question about sidebar. I see that you have:
panel_:
esphome:
title: 'ESP Home'
url: '192.168.1.5:6052'
icon: mdi:raspberry-pi
But I can't open and have got following link: 192.168.1.5:8123/esphome
The problem is in embedding http page from ESPHome with https from Home Assistant.
www.home-assistant.io/integrations/panel_/
Hej dobar dan! Kako si? I hope that you are fine during this Corona crisis in Hrvatska. When you can and have time ofcourse could you please add a video for pi-hole 5.0 docker installation when it’s available? Thank you in advance!
Hej Sil! Nije loše! :)
Sorry it took me a bit longer for this answer. I still haven't tried new version of PiHole but I did browse around a bit and it looks like new version should be able to install with same instructions - creating macvlan, bridge network and using same Docker command.
I'm not using it myself as I find AdGuard much better in what it does.
Also, since both installations (AdGuard and PiHole) are using macvlan I've noticed a lot of people having issues due to not following instructions completely (for ex. failing to verify exact Ethernet port or using wrong IP subnet, etc), those videos have created more negative reactions then positive. That's why I'll probably not be doing updated video on this one.
BeardedTinker Hej BT, Hvala for your reply. Nadam se da je sve dobro. I can confirm that with your previous instructions pi-hole 5 was installed without any issues. I can confirm that the per client blocking is working fine. I will check online for adguard.
Thank you!!
Is there also a way to show hostnames instead of IP's (for DHCP clients) in Pi-Hole?
Thank you for the great step by step guide, had it running on same IP as my Synology, but this is much better!
Hmm, with DHCP it's a bit harder. In Settings - Client settings - there is option to configure clients. There you can use MAC address to identify specific devices.
@@BeardedTinker I don't use DHCP on Pi-Hole, so I guess I do not have that Client settings option? Thanks!
@@SmeetsDieter I was looking at AdGuard :) Sorry for that one. But, no this was not in DHCP of AdGuard but other setting. Don't have PiHole running anymore as I find AdGuard much more user friendly so can't look for it there. BUT I presume that it should have something similar.
@@BeardedTinker Okay thank you, will look into that also. Can you also assist us on how to get multiple containers running, when I only have one running this works but when I want to create another macvlan IP, I get an error: Error response from daemon: failed to allocate gateway (192.168.10.1): Address already in use
Thanks again!
Hello, again!
I have been following your tutorials religiously and i am learning a lot of things. Thank you for all the time you take for us it's really appreciated!
Obviously I also have something that is not working with this pi-hole install. It keeps closing and re opening every 5 minutes or so... here is the portainer logs for pi-hole
pastebin.com/KKPGDPrX
hope you
It also messes up with HA, i ket all kinds of errors when pihole is on now... :( look at all these: pastebin.com/fcsrHK0r everything was working now... i dont understant what could have broken so many things at once during this install
please help me get back to a viable state
thanks