Cannot access Pihole (with macvlan) from Homepage (dashboard) container

  • Hi,

    I just installed Pihole as a docker container on my OMV. I use it as DHCP server on my LAN, so I created a macvlan network interface like below :


    Code
    [ { "Name": "macvlan-ntw", "Id": "81f2a0f1eebfa65771d4fd4b29d4aa81b99ed4b737988447a5adcecbb739d1ee", "Created": "2025-07-15T18:21:03.841818958+02:00", "Scope": "local", "Driver": "macvlan", "EnableIPv4": true, "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "192.168.1.0/24", "Gateway": "192.168.1.1" } ] }, "Internal": false, "Attachable": true, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "43f3383965069737daeb4c200b57c109d5c2e805d74b4bc56272291a67998e8b": { "Name": "pihole", "EndpointID": "e79f2b53ab5af2bea42fbfba59fe021f28108b792e6ccb380700fc97ae1947d5", "MacAddress": "a2:fd:3c:cd:99:12", "IPv4Address": "192.168.1.19/24", "IPv6Address": "" } }, "Options": { "parent": "enp1s0" }, "Labels": {} }
    ]

    And in the pihole compose.yaml :

    Code
    networks:
      macvlan-ntw:
      ipv4_address: 192.168.1.19
    networks:
      macvlan-ntw:
      external: true

    Pihole works fine, as DHCP and DNS on my LAN, so far so good.


    -=-


    But I am also using Homepage Dashboard (docker), and that container cannot ping pihole container. Homepage container uses a standard bridge network.


    Code
    [ { "Name": "homepage_default", "Id": "0fe929fe972855ce488c014ac7799aac23c1450cc28b79991a7a28ecb3b3a783", "Created": "2025-06-24T15:57:06.656193195+02:00", "Scope": "local", "Driver": "bridge", "EnableIPv4": true, "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "172.19.0.0/16", "Gateway": "172.19.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "a3b56a1406836484ada691d0c67e04aafdfeeebd8bf5f25eaa558b0297d3673b": { "Name": "homepage_n150", "EndpointID": "9260afb9217420d7ca03411244672de6e8a8366390eddb0fb66c6ebde2065ad5", "MacAddress": "fe:23:96:25:83:72", "IPv4Address": "172.19.0.2/16", "IPv6Address": "" } }, "Options": {}, "Labels": { "com.docker.compose.config-hash": "60ce0d492a4086a6423246d60ff394236e5f809c245ae6f6eb5712ab783f2090", "com.docker.compose.network": "default", "com.docker.compose.project": "homepage", "com.docker.compose.version": "2.34.0" } }
    ]


    From what I have read, it is expected that Homepage container cannot communicate with the pihole container due to macvlan adapter : containers using macvlan cannot communicate with host.


    So what is the easiest way to make Homepage container able to ping the pihole container ?

  • is a normal behabiour of dockers and is not OMV related.


    You can't access from one docker to other in a MacVLAN.



  • Thank you for your answer, yes it is a docker behaviour, I was expecting (dreaming ?) there might be some specific OMV parameter allowing to ping macvlan container from another one... ?(


    So from the links you provided, it appears to be difficult using macvlan network : no easy way ! looking at your second link : it is about setting up all containers to use the macvlan network (defining a ip-range when creating the interface) if my understanding is correct. Looks a bit challenging to me, and would need me to review all my containers. But looks like the most efficient method...


    I am still confuse which method should I use for my Docker Pihole server : as I want to use it as the DHCP server on my LAN, the other way is to use the host networking mode, according to that doc (much more easier). But they say "you may still have to deal with port conflicts", as Pihole will have the same IP as the host, so as OMV.


    Not sure which king of issue I would have to deal with ? For example port 53 ? Would OMV and Pihole be in conflict here ?



    .

  • Reviewing my requirement : considering Homepage access to Pihole is only to display API stats (["queries", "blocked", "blocked_percent", "gravity"]), which is nice but not something mandatory, and the complexity of the problem, I will stay like this : Pihole is working nice as DNS & DHCP, using the macvlan adapter, and this is by far the most important.
    Cosmetic API information on my Homepage dashboard is something I can do without !


    Thank you for your help in understanding the problem.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!