#1533·caprover

Real support for IPv6 instead of NAT

Author: delasourceCreated Oct 14, 2022Updated Jun 22, 2026
Labelsfeature-request

Is your feature request related to a problem? Please describe. IPv6 is not fully supported in the current Docker Swarm configuration. A default caprover setup as of today, creates ipv6 to ipv4 translation. While this works, it lacks one essential feature: The container does not have a clue of the client's real ipv6 address. All it sees is the "translator" which is in my case always 172.18.0.1 (host's address of the interface docker_gwbridge).

This makes apps like matomo more or less useless.

Describe the solution you'd like All containers should be able to have an ipv6 address automatically and route traffic correctly. In scenarios with ipv6-only hosts, the default setup does not even work at all.

Describe alternatives you've considered In robbertkl/docker-ipv6nat the author tells how to init Swarm with ipv6 enabled. While this gives any container a valid ipv6 address, i was not able to have correct ipv6-packet-routing, and web requests end with an "empty response".

Additional context related to #594 and https://github.com/caprover/caprover/issues/1077#issuecomment-1277426425

ADD:

The nginx-1 container also does not get ipv6 traffic as such, but as ipv4 traffic from 172.18.0.1, which means that Logs do not contain ipv6 traffic at all, because of this rule in the default config:

geo $remote_addr $ip_in_log {
    172.16.0.0/12 0;
    ...

Which in turn makes configurations with fail2ban absolutely useless.