Skip to content

Docker Compose setup: Native IPv6 #2175

@doschn

Description

@doschn

Describe the Bug

Following the Docker Compose setup guide traefik doesn't reveal the client's IPv6 Addresses within logs if requests are performed with native IPv6 only.

This is causing Problems with GeoIP based rules (blocked in my case) and showing wrong IP-Adresses within the Access-Logs (see screenshots attached)

Image Image

Traefik logs also recorded the internal docker gateway address (172.18.0.1 in this case) - the internal GW address have been confirmed by docker network inspect pangolin (renamed default network according to guide).

Please update docs containing the solution below or ask me to create a PR for the docs.

Environment

  • OS Type & Version: Rocky Linux 9.7 (Blue Onyx)
  • Pangolin Version: 1.14.1
  • Gerbil Version: latest
  • Traefik Version: 3.4.0
  • Newt Version: N/A
  • Olm Version: (if applicable)

To Reproduce

Manual Docker Compose setup with IPv6 enabled host (but not docker network) and clients requesting IPv6 only (IPv4 disabled).

Expected Behavior

Traefik to show Client's real IPv6 Addresses instead of the internal docker networks gateway address.

This can be achieved by enabling IPv6 within the docker network as following:

networks:
  default:
    driver: bridge
    name: pangolin
    enable_ipv6: true # Uncomment if host uses native IPv6 and AAAA DNS records for the pangolin domain are set 

after this change Traefik was enable to record the native IPv6, not the internal IPv4 NAT Docker Gateway Address.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions