Skip to content

v6 FTL returning wrong IPv6 address for host #1772

Open
@gothicVI

Description

@gothicVI

I use the following docker-compose.yml and the debug token is https://tricorder.pi-hole.net/acycmCOw/

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: raspberrypi
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      # DNS Ports
      - "53:53/tcp"
      - "53:53/udp"
      - "8090:80/tcp"
      - "8091:443/tcp"
      # Uncomment the below if using Pi-hole as your DHCP Server
      # - "67:67/udp"
    environment:
      TZ: "Europe/Berlin"
      FTLCONF_webserver_api_password: ""
      # If using Docker's default `bridge` network setting the dns listening mode should be set to "all"
      FTLCONF_dns_listeningMode: "all"
      FTLCONF_dns_reply_host_IPv4: "192.168.178.2"
      FTLCONF_dns_reply_host_IPv6: "fd00::3ee9:3bb4:e994:500c"
    # Volumes store your data between container upgrades
    volumes:
      - "./etc-pihole:/etc/pihole"
    cap_add:
      # See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
      # Required if you are using Pi-hole as your DHCP server, else not needed
      # - NET_ADMIN
      # Required if you are using Pi-hole as your NTP client to be able to set the host's system time
      # - SYS_TIME
      # Optional, if Pi-hole should get some more processing time
      - SYS_NICE
    restart: unless-stopped
    networks:
      - pi-hole

networks:
  pi-hole:  # Defines a custom network named "pihole_network"
    driver: bridge  # Uses the bridge driver (default for Docker networks)
    enable_ipv6: true  # Enables IPv6 support for this network
    ipam:  # IP Address Management (IPAM) configuration
      driver: default  # Uses Docker's default IPAM driver

The container addresses also showing up in the ui are 172.21.0.2 and fd3b:2b2d:793a::2 or fe80::184a:9ff:feaa:bb18. The addresses assigned to the host via my router are 192.168.178.2 and fd00::3ee9:3bb4:e994:500c which are also added as local DNS entries and as environmental variables via the docker-compose.yml.

However, when querying the host I get the container address instead of the assigned address.
From the host:

$ nslookup raspberrypi 
Server:		192.168.178.2
Address:	192.168.178.2#53

Name:	raspberrypi
Address: 192.168.178.2
Name:	raspberrypi
Address: fd3b:2b2d:793a::2

$ nslookup pi.hole
Server:		192.168.178.2
Address:	192.168.178.2#53

Name:	pi.hole
Address: 192.168.178.2
Name:	pi.hole
Address: fd3b:2b2d:793a::2

$ nslookup 192.168.178.2
2.178.168.192.in-addr.arpa	name = raspberrypi.

$ nslookup fd3b:2b2d:793a::2
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.3.9.7.d.2.b.2.b.3.d.f.ip6.arpa	name = pi.hole.

$ nslookup fd00::3ee9:3bb4:e994:500c
c.0.0.5.4.9.9.e.4.b.b.3.9.e.e.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa	name = raspberrypi.

From another host in the network:

$ nslookup raspberrypi
Server:		192.168.178.2
Address:	192.168.178.2#53

Name:	raspberrypi
Address: 192.168.178.2
Name:	raspberrypi
Address: fd3b:2b2d:793a::2

$ nslookup pi.hole
Server:		192.168.178.2
Address:	192.168.178.2#53

Name:	pi.hole
Address: 192.168.178.2
Name:	pi.hole
Address: fd3b:2b2d:793a::2

$ nslookup 192.168.178.2
2.178.168.192.in-addr.arpa	name = raspberrypi.

$ nslookup fd3b:2b2d:793a::2
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.3.9.7.d.2.b.2.b.3.d.f.ip6.arpa	name = pi.hole.

$ nslookup fd00::3ee9:3bb4:e994:500c
c.0.0.5.4.9.9.e.4.b.b.3.9.e.e.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa	name = raspberrypi.

From the running container:

# nslookup raspberrypi
Server:		127.0.0.11
Address:	127.0.0.11#53

Non-authoritative answer:
Name:	raspberrypi
Address: 172.21.0.2
Name:	raspberrypi
Address: fd3b:2b2d:793a::2

# nslookup pi.hole
Server:		127.0.0.11
Address:	127.0.0.11#53

Name:	pi.hole
Address: 192.168.178.2
Name:	pi.hole
Address: fd3b:2b2d:793a::2

# nslookup 172.21.0.2
2.0.21.172.in-addr.arpa	name = pihole.pi-hole_pi-hole.

Authoritative answers can be found from:

# nslookup 127.0.0.11
** server can't find 11.0.0.127.in-addr.arpa: NXDOMAIN

# nslookup 127.0.0.1
1.0.0.127.in-addr.arpa	name = localhost.

# nslookup 192.168.178.2
2.178.168.192.in-addr.arpa	name = raspberrypi.

# nslookup fd3b:2b2d:793a::2
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.3.9.7.d.2.b.2.b.3.d.f.ip6.arpa	name = pihole.pi-hole_pi-hole.

Authoritative answers can be found from:

# nslookup fd00::3ee9:3bb4:e994:500c
c.0.0.5.4.9.9.e.4.b.b.3.9.e.e.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa	name = raspberrypi.

This also shows that there seems to be an issue with the assigned IPv4 address for localhost as described in #1729. It should read 127.0.0.1 and not 127.0.0.11 or am I wrong here? (This should be unrelated to the issue though)

This is a: Bug

Details

Related Issues

  • I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar

How to reproduce the issue

  1. Environment data
  • Operating System: Rasbian
  • Hardware: RasPi 4B
  • Kernel Architecture: ArmV8 64bit
  • Docker Install Info and version:
    • Software source: Docker version 28.0.1, build 068a01e
    • Supplimentary Software:
  • Hardware architecture: ARMv8
  1. docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
  2. any additional info to help reproduce

These common fixes didn't work for my issue

  • I have tried removing/destroying my container, and re-creating a new container
  • I have tried fresh volume data by backing up and moving/removing the old volume data
  • I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • I have tried running without my volume data mounts to eliminate volumes as the cause

If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions