Ipv6 not working in pihole docker container

I have a rpi 4, running raspian, updated yesterday.
PiHole is running in a docker container, using the docker-compose script shown on the github page (also below). Everything seems to be OK (see debug log token below), but it looks like ipv6 isn't working. The host system has ipv6 enabled, and seemingly functioning correctly. I haven't yet configured anything else, since I want to resolve this first!

Thanks for PiHole, and for your support!

Expected Behaviour:

ipv6 is working in the PiHole container without issues.
In the host environment, if I run ip -o addr | grep eth0, I get:

2: eth0    inet 192.168.1.2/24 brd 192.168.1.255 scope global noprefixroute eth0\       valid_lft forever preferred_lft forever
2: eth0    inet6 2001:8b0:dea0:f3c9:4288:4f9e:6477:4ca2/64 scope global dynamic mngtmpaddr noprefixroute \       valid_lft 5225sec preferred_lft 5225sec
2: eth0    inet6 fe80::377b:bb5f:72f:c2c0/64 scope link \       valid_lft forever preferred_lft forever

Also, from the host environment, I am able to ping ipv6.google.com and get a correct response.

Actual Behaviour:

Error reported in debug log:
[✗] No IPv6 address(es) found on the eth0 interface.

Debug Token:

https://tricorder.pi-hole.net/hIlp9YoM/

docker-compose.yaml:

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"
    environment:
      - TZ=${TZ:-'Europe/London'}
      - WEBPASSWORD=${WEBPASSWORD}
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped

Docker is IPv4 only by default.

You'd have to refer to Docker's documentation on how to enable IPv6 for Docker's daemon in general as well as for a specific container.

Note that Docker's IPv6 support could have been breaking network isolation in the past.
It seems Docker tried to address this in the meantime, but it may yet be considered experimental.

Quoting docs.docker.com:

ip6tables enables additional IPv6 packet filter rules, providing network isolation and port mapping. This parameter requires experimental to be set to true .

Thanks for the information @Bucking_Horn. I don't need ipv6 per se, but I was concerned I had an issue before I go down the route of integrating PiHole in my network.

IPv6 was the reason I moved away from Docker to Proxmox LXC Linux containers. Docker and IPv6 just wasn't meant to be when I was trying it out.

I think I may end up following you down this route, as I need to consider my whole infrastructure here. I have a Linksys wrt3200 currently running the stock firmware, and while it works, I do get issues with the interface software. For example, it starts taking a label from one device, and attaching it to others, and also some hosts show up so I can ssh in, but others don't. I also have a VPS off site which I should be able to close down, but I need to move the functionality from it to local server. So I am considering replacing the Linksys with a protectli device (or similar) running pfSense or opnsense, and then use an older pc I have here as a server. Once I get my head around Proxmox, I can then consider if I need to upgrade the hardware to get the performance I need. Now I am off reddit, I need to find a good forum for home labs!

Sounds like a plan. There are lots of great home lab channels on YouTube. I moved away from locked down routers over 4 years ago and haven't looked back. I went the route of Protectli and landed on Untangle. Then when Untangle was purchased by Arista I moved to pfSense. I built a small 2 node Proxmox cluster with inexpensive 1 liter PC's recommended on the Serve the Home channel. I now have a PiHole instance on each node for redundancy and then all my other services spread between the two. It's a great hobby to have a home lab.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.