Docker - pihole

hello, can somebody help me with this? http://forum.mikrotik.com/t/pihole-in-container-not-working/161516/1

If you started own new topic of “docker+pihole” then wait for help in it.

thanks, I’ll try it.

I did exactly but the pihole page not open I got this page

any help please
regards

I got the same Placeholder page
try admin ex: http://10.10.10.1:888/admin

try to use a different build of pihole (not the “latest”), the 2022.09 has worked for me:
/container/add remote-image=pihole/pihole:2022.09 interface=veth1 root-dir=disk2/pihole mounts=dnsmasq_pihole,etc_pihole envlist=pihole_envs
check the root dir, accodingly

this could be due these changes https://pi-hole.net/blog/2023/01/15/pi-hole-ftl-v5-20-1-web-v5-18-1-and-core-v5-15-released#page-content anyway cant run even previous versions
:latest should wok with adiing /admin to IP but got connection refued od all potrs except 80 and 80 return placeholder page :slight_smile:

Hi All,
I had a RPi4 Pihole for a couple year perfectly working and heard of the possibility to configure a Pihole container into my RB5009 so I decided to give it a try.
I’ll avoid for now to fill this message with all the ROS configuration, maybe I could post it later if something punctual is needed.
I have ROS 7.13.1

Well, I configured the container following the guide and I give also a try to something different (as someone here already did).
A this point I have 2 pihole container (with the same internal configuration), both of them have issues but different ones.

To filter all the possible suggestions I want to remark that:

  • both the containers can access the internet
  • both are reached from the devices in the network
  • pihole software works as intended (note: according to what provided by the router, see second container issue)
  • I already tried multiple flushes of the network tables and restarts of the dns resolver

The first one, configured without using a specific docker bridge has a veth with an address on the same range of the router’s dhcp (192.168.1.0/24).
It works smoothly as the RPi4 did, but randomly, when rebooting the router, the container can’t start, nor automatically (is set to start on boot), nor manually, even when trying to start it from the terminal, hitting enter print a “space” and nothing appear in the log. When this happends I can’t even ping the assigned ip, but looking at the interface or the bridge port there’s nothing strange. It seems something related to the veth/bridge management, maybe on boot sometimes something come up before, sometime after the veth is started (I know that network people is reading this and screaming, but I’m not a “super guru network guy”) and this make it not working

The second one, configured using the docker bridge (with an addres into the 192.168.5.0/24 range), works too, but with a frustrating behaviour. In the pihole web interface, under tools>network, all the devices (except itself) don’t show anymore the mac address…and of course all the client rules uses the mac address to bind, so this way, binding to a specific group is broken and only default rules works. I should bind again all the clients using their IPs (not a huge problem because all of my devices have static leases in the DHCP, but still an issue) but this approach really sucks. Because the second one was a “late night try” I still didn’t try to reboot to see if the “not starting” first container’s issue happend with this too.
In this case it seems I miss to configure something to let the docker bridge be able to “know” the mac addresses of the clients from the main bridge, but, as I said, I’m not a “super guru network guy”, and I don’t know how to fix it.

can someone please help me?
thank you

Well, apparently I accidentally discovered the reason why container weren’t able to start after a reboot. It was an USB issue discussed here http://forum.mikrotik.com/t/rb5009-routeros-7-9-1-usb-slot-keeps-changing/167185/14

I think I will go with the container in the same ip range of the DHCP, but I’m still bit curious about how to resolve the issue of the second container

in the case where the veth was not on the docker bridge, did you add it to main bridge? do you have vlan on your network..did you have to change anything else on the bridge veth port(if you assigned it to main bridge) to get it to work

yes, I addet it to the main bridge. I have no VLAN and no other specific configuration for the veth was needed (just copied the other bridge ports configuration).
as a suggestion, I noticed strange behaviours adding a static entry for the veth on the ARP list (I then understood this is because after every reboot it changes the MAC), adding a static entry on the DNS for its IP and the same with the kid control too

If you want to keep static DHCP assignments of IPs for that switch, another option is to disable the auto-mac setting, then set admin-mac to the value it would have if veth1 wasn’t there competing for “bridge MAC address”.

I’ve recently disabled auto-mac for other reasons, because I wanted to decide which of the ports’ MAC had to be used, but when auto-mac was enabled the veth1’s MAC was never the one chosen for the bridge. As far as I remember it was just the first lan port available.
I think this wouldn’t solve the continuously changing veth1 MAC address, but to be honest it’s not even a big problem, it’s just my psychological problem :rofl:

Thanks it’s works for me. I follow the YT guide from Mikrotik channel.