IPv6 with Docker on Kimsufi (OVH)
Kimsufi only gives a single /128 IPv6 address per host, so we can’t just give containers routable addresses D:
But we can do NAT (similar to how IPv4 works), with the docker host having one public IP, and using iptables to route traffic to the container’s internal private IPs.
/etc/docker/daemon.json:
ipv6is needed to enable IPv6 support in Dockerfixed-cidr-v6is needed foripv6- even though for each network which we want to be ipv6 enabled, we’ll specify a different range, the docker deamon still insists that we supply a default
- we can use the private
fd00::/8range for this, equivalent to docker’s IPv4172.16.x.x/12range - in this example, we use
fd00:dead:beef:N::/64withNbeing 0 for the default network and then different numbers for eachcomposenetwork we create
ip6tablesis needed to route traffic from the one public IPv6 address to the container’s internal private IPv6 addressexperimentalis needed forip6tables
{
"userland-proxy": false,
"ipv6": true,
"ip6tables": true,
"experimental": true,
"fixed-cidr-v6": "fd00:dead:beef:0::/64"
}
~/Projects/server/compose.yml:
networks:
default:
enable_ipv6: true
ipam:
config:
- subnet: fd00:dead:beef:1::/64
services:
traefik:
image: traefik:v3.7
ports:
- 80:80
- 443:443/tcp
- 443:443/udp
whoami:
image: traefik/whoami
labels:
traefik.enable: true
traefik.http.routers.whoami.rule: "Host(`whoami.shish.io`)"
$ curl --silent https://whoami.shish.io | grep X-Real-Ip
X-Real-Ip: <my client IPv6 address>
2026-07-05 00:00:00 UTC