Docker Community Forums

Share and learn in the Docker community.

Raspi 4 PiHole Docker Cloudflared ipv6 challenge

Hi,

I am currently struggling at enabling IPv6 for PiHole in a docker container.
At the moment I have a Raspi 4 running docker with 2 containers.
One is pihole, the other one i cloudflared.
Both connect on a separate macvlan network with a small IP Range /30 via IPv4.
The request from pihole with be forwarded to the cloudflared container at #5053 and everything is working smooth.

I now would like to replace my old Raspi 2B+ with a native pihole installation. The only thing that is missing, is ipv6 for pihole in docker.

And that is where the problems start.
At the moment I tried the following:

  1. I enabled IPv6 for Docker via /etc/docker/daemon.json:
{
    "ipv6": true,
    "fixed-cidr-v6": "2003:xxx:xxxx:xxxx::/64"
}

There is my first question. Is it correct to use the global ip range of eth0 or should I use the “fd00::/64” address?

  1. I created a new macvlan configuration with a /64 subnet for the IPv6 address and also created the network itself, connected it to the pihole container and added the IPv4 address. I left the IPv6 open to see what happens.
    When the container is started, the inspect shows an IPv6 address and it is also pingable and I can connect to the website via that address to the admin panel.
    But in the admin panel for the ipv4 and the ipv6 address only 0.0.0.0 and 0:0:0:0:0:0 is shown.

So what exactly do I have to do to enable ipv6 via macvlan for the pihole and cloudflared container and which address do I have to use?

Thanks a lot in advance.
shirocko

Currently I still have static ip addresses for the Raspi and also the hostname etc. is set the way I want to have it.
Currently I am struggling with IPv6 in docker, not on the host.

I have chosen the implementation with docker on purpose.
I want to run multiple containers on that Raspi and port 53 is already used by another software on that machine and I also want to have a separate ip address for the pihole container.
So at the moment I was able to activate IPv6 for Docker and I also configured the address for the pihole and cloudflared container, but I got an address conflict.
When I activate the subnet “fd00::/64” for the docker network and I also use it for the macvlan, then docker crashes at next startup due to address conflict.
But if I choose another subnet like “fd01::/64” I cannot set the gateway to “fd00:…” because it is out of the range of the network.
How can I combine two different IPv6 or the same IPv6 subnet to work the way I want it?