You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the merge of moby/libnetwork#2572 we're finally 1 step closer to having IPv6 NAT built into Docker!
I'm creating this issue to track the release of this feature, and to figure out if there are any remaining use cases for this tool. If not, we can deprecate this tool in favor of the built-in functionality.
Reacted by Alexandre Alapetite and Philip Chan
Reacted by Florian Kaiser, Ian Foster, spconley, Marc Hörsken, Yuhui Xu, Amjad Ali, Leo Verto, Christian, Manuel, Kyle Manna and 10 more
@robbertkl I think we should keep it up until built-in IPv6 NAT is rolled out for most distributions.
In addition to this, it is required to check if built-in IPv6 NAT behaves the same way docker-ipv6nat does. 😉
Reacted by Robbert Klarenbeek, spconley and TR_SLimey
Exactly, agree 100%! I wanted to use this issue to share findings on behavior of built-in IPv6 NAT. After confirming this tool is no longer needed, I wanted to deprecate it with a README message, but still keep it available until the built-in IPv6 NAT is widespread.
I was actually coming here to open a ticket about this very thing. :)
The latest stable update on Manjaro included Docker 20.10, and I saw the new ipv6nat functionality--and read the long thread of people trying to figure out exactly how it should work, here: moby/moby#41622
It sounds like it's very much still experimental? I'm not sure how to check whether a feature is considered experimental or not?
In the meantime, if we've been using docker-ipv6nat without issue, can we just continue as we were, or will the new built-in tools break it? I'd prefer not to switch until it's had at least a few months for the most critical bugs to be worked out.
(It's also amazing to me--in a good way--that the official Docker release is implementing IPv6 NAT after months/years of philosophical pushback about that NAT'ing IPv6 being Wrong®. Maybe it is in most contexts, but it's clearly the best way to go in Docker, given how seamless v4 NAT'ing is with containers.
Thanks for all your work on this. I could never have used IPv6 before this point on docker without your work. :)
I have no intentions of pulling the plug until we can all agree Docker offers the same functionality (and stability). Of course, I'll be hesitant to add new features to docker-ipv6nat when it might be deprecated "soonish". We're keeping an eye on the development within Docker, and currently have no reason to think it will break docker-ipv6nat if you keep it disabled. Thanks for the support @johntdavis84 !
Reacted by Alexandre Alapetite, C7n@B8r, johntdavis84, Ian Foster, Pascal Mathis and MaxPeal
I’m very pleased to see how aggressively this is being developed/bugs are being squished. If this is going to be part of docker’s core functionality, it needs to be rock solid.
It’s especially nice to see given the previous resistance from some of the docker community to incorporating NAT-based IPv6.
Robbert, are they collaborating with you at all or drawing from your codebase, or did they roll this from scratch?
- JTD.
No collaborating, I think they rolled it from scratch. That makes most sense, as they can mirror the internal workings of the IPv4 NAT. Docker-ipv6nat is set up as an external listener, so doesn't make much sense to draw from this codebase.
I agree that it seems they're very much on top of things. Since the decision was made to make it part of Docker, they're taking it seriously.
That makes sense. Thanks for taking the time to explain how these things work. I’m a relative Linux/networking newbie, and I feel like I’m starting to get a handle on the basics, but the intricacies of IPv6 especially, and how it is implemented across various systems, remains impenetrable deep magic.
I understand why IPv6 is so important, but I am deeply concerned that it’s so difficult to use compared to IPv4. That’s fine for commercial/professional deployments, but the current tools available do not seem anywhere near as accessible to home networking prosumers as the IPv4 tool stack is.
Docker-ipv6nat is one of the few “let’s make this easier” v6 tools I’ve found.
- JTD.
On Jan 6, 2021, at 12:41 PM, Robbert Klarenbeek ***@***.***> wrote:
No collaborating, I think they rolled it from scratch. That makes most sense, as they can mirror the internal workings of the IPv4 NAT. Docker-ipv6nat is set up as an external listener, so doesn't make much sense to draw from this codebase.
I agree that it seems they're very much on top of things. Since the decision was made to make it part of Docker, they're taking it seriously.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#65 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGI5CYVGKJEVDMVKH33SDHDSYSVHBANCNFSM4UHVYYOQ>.
Has anyone tried enabling IPv6 NAT for the default bridge network? In my case dockerd tries to execute a wrong command and crashes. Reported it here: moby/moby#41861
With Docker 20.10.6 the ipv6nat function is fully intergrated (experimental).
You can add the following flags to your daemon.json: { "ipv6": true, "fixed-cidr-v6": "fd00::/80", "experimental": true, "ip6tables": true }
Reacted by Alexandre Alapetite, Marc Hörsken, Mark Vander Stel, Sara Aimée Smiseth, Hans, Roger, Thorsten and Khoo Hao Yit
With Docker 20.10.6 the ipv6nat function is fully intergrated (experimental).
You can add the following flags to your daemon.json: { "ipv6": true, "fixed-cidr-v6": "fd00::/80", "experimental": true, "ip6tables": true }
Thanks for the update. How does this compare to the earlier updates that enabled/tweaked IPv6 NAT? Is it considered feature complete now/lacking known bugs?
I found this in the release notes:
Networking
Fix a regression in docker 20.10, causing IPv6 addresses no longer to be bound by default when mapping ports moby/moby#42205
Fix implicit IPv6 port-mappings not included in API response. Before docker 20.10, published ports were accessible through both IPv4 and IPv6 by default, but the API only included information about the IPv4 (0.0.0.0) mapping moby/moby#42205
Fix a regression in docker 20.10, causing the docker-proxy to not be terminated in all cases moby/moby#42205
Fix iptables forwarding rules not being cleaned up upon container removal moby/moby#42205
You are both right. It had nothing to see with anything of that. For an obscure reason, my daemon.json got entirely deleted so ipv6 was half-working, which caused client ip to be masked. userland-proxy indeed preserves client ip as I have now restored my daemon.json and it all works perfectly. I'm very sorry for bothering you with false lead.
I now need to find out what could have caused this, but that's an entirely different issue I will search for myself.
Bit of a big reply, and mostly redundant now since the cause was found, but maybe below has some value for others as reference 😅
Misconfigured IPv6
userland-proxy: true + ip6tables: false (defaults in daemon.json)
I tried creating a new one, and I confirm each container get an ipv6 address. For example "IPv6Address": "fd00:cafe:face:feed::2/64". Then, if I use this container, what it sees from the client is fd00:cafe:face:feed::1
This would have been due to the daemon.json misconfig issue you discovered. ip6tables: true + experimental: true is required for the proper routing rules to be applied by Docker when userland-proxy: true is active.
Since an IPv6 address was assigned to the container, the proxy routed to that through the IPv6 network gateway IP. It's the same behaviour as you'd get with the IPv4 one, and IIRC is userland-proxy: true trying to be helpful since there is no proper IPv6 routing rules in place (ip6tables).
Once you had that correctly applied, it worked properly. Doesn't seem like I address that in the DMS docs, but it is a gotcha I recall experiencing too when I was researching this. I should probably mention that caveat, so thanks for bringing it to my attention 👍
Correctly applying changes to daemon.json
I now need to find out what could have caused this
Docker v25 change with IPv6 (edit: collapsed as unlikely)
What version of Docker are you running on?
v25 introduced a change (and maybe they backported to v23/v24) which will automatically/implicitly enable IPv6 in daemon config if a container assigns an IPv6 address I think. EDIT: Seems related to setting ipv6: true per network with an IPv6 subnet assigned, daemon.json has an ipv6 setting for the legacy bridge docker0 (typically not relevant to compose.yaml)
Other than that, you have to make sure you run systemctl restart docker to apply the changes made to daemon.json, a reload isn't sufficient IIRC.
daemon.json replaced when associated package updates
they have had instances of outright replacing that file in the past.
If that happens, you can use a systemd unit drop-in override to provide your own command to run dockerd which points to your own daemon.json file. That should avoid any surprises there?
userland-proxy: true
Enabled (default) vs Disabled
Is there downsides of turning it off
There are some differences in the routing, the referenced docs issue of mine details these here:
Which I later try to present via a table for comparison (not entirely complete, lost a latter revision and didn't have time to repeat testing):
So it really depends on if you need containers to talk to each other or between the host. Some of those are resolvable and I shared how to adjust the rules but I don't think any of them were since upstreamed. If you only have remote connections where client IP is a concern, then it's really only the IPv6 one which userland-proxy: false resolves.
May eventually be disabled by default + future replacement for iptables / ip6tables
it's actually enabled by default according to the docs.
Yes userland-proxy: true is default and has been for a long time.
There is a separate issue for tracking when that'll be changed, but the Docker devs want to minimize the differences I documented above AFAIK. I don't think they can keep the IPv6 localhost routing without userland-proxy: true however, so if anyone relied on that for some reason it'd be a breaking change.
There's also an alternative approach with a new networking mode/driver, which is intended to replace iptables based routing in future as a new default AFAIK. Not sure if much progress has been made on that since it's announcement.
we disable it in our project but I suspect the original reason was due to performance.
For @LeVraiRoiDHyrule this is another difference, skipping the proxy will avoid some overhead which improves throughput if you have a need for network I/O and want it to match performance outside of a container better. I recall a iperf3 test doubled in throughput with userland-proxy: false.
Reacted by salty, Nicolas Duchon, Robbert Klarenbeek, Frugan, krassle, Albrecht, Sven Gottwald and Vasilis Tsiligiannis
Cleaning out my older emails, I saw this thread and clicked through. I was surprised it's still open. Is this software fully depreciated now, or is Docker's builtin support still not quite there?
@robbertkl Thanks again for all your work on this. I'm not using Docker as much anymore (I've gotten sucked into the Proxmox vortex), but when I was I never would've gotten IPv6 working without this.
The relevant containers get IPs in 172.27.1.0/24 and fd00:69:420:42::/64. Inside out connectivity seems to be fine. But I can't connect to services from outside.
ipv4 is fine https://thevault.local:9043/#!/3/docker/dashboard
ipv6 is not https://[fe80::265e:beff:fe6b:ae54]:9043/#!/3/docker/dashboard OR https://[2607::]:9043/#!/3/docker/dashboard
Bridged to host and the host webUI itself on https://[fe80::265e:beff:fe6b:ae54]/ OR https://[2607::]/ works.
So specifically 6to6 routing from me into my NAS isn't working.
Should I see anything in ip6tables -t mangle --list? -t filter and -t nat are full, and I have ipv6 connectivity in containers so I think I've done everything right.
You should not need this project anymore AFAIK, just setup IPv6 on your containers the standard way should be fine?
The fixed-cidr-v6 setting is specifically for Docker's legacy docker0 default bridge network AFAIK, so don't try to assign a user-defined network to that which has different network routing rules managed by Docker than it's legacy bridge.
You may also want to look at disabling the userland-proxy by setting that to false in your daemon.json config too. When it's true (default) it can route external IPv6 connections to IPv4 in a container when there's no IPv6 setup for the container, and that loses the original client IP.
I also recall that some of these settings (at least the userland-proxy) were (and may still) have side effects when changing and applying a restart of the daemon, instead you might have a more reliable troubleshooting experience by restarting the system after changes to daemon.json if things aren't acting as expected.
I think I already touched on this advice earlier in May 2024 above I think, but as new comments are added that'll soon get buried/hidden from Github UI collapsing the middle of the discussion here, so I'm linking it in this comment for better discoverability 😅
You may want to also try update to newer Docker if you can as I think there's been various networking fixes/improvements, check their release changelog page (it's on their docs) and look for network changes since your current release.
When you have userland-proxy: true (default) this does adjust some kernel related settings, and at least previously I think IPv4 and IPv6 weren't at parity, so there's a chance that is affecting you. Also see the link to my earlier comment I mentioned where I show a connectivity table based on how this setting affects connectivity success based on where the connection is made from and to. That table might be a little outdated, I haven't tested it since.
And my manually made bridge with --ipv6 should be the way?
Also looks like I never had the proxy running. unable to configure the Docker daemon with file /share/ZFS530_DATA/.qpkg/container-station/etc/docker.json: the following directives are specified both as a flag and in the configuration file: userland-proxy: (from flag: false, from file: false)
This is the cleanest iptables dump I've seen since I started this.
I still can't get from my PC or phone to my containers, my containers still have outbound ipv6 working.
Are you running Docker installed/managed by a NAS? Or did you install Docker from their official third-party repo?
I maintain a dockerized project that often has niche problems like network or filesystem/permission related for users that run the containers on a NAS. Sometimes this is due to heavily modified and/or outdated kernels, or in your case I guess perhaps modified defaults that don't match upstream Docker?
FWIW I tend to prefer using Docker Compose most of the time, but it should be fine with Docker CLI. I have had IPv6 working on several VPS instances, although my local devices could not connect to them as they did not have IPv6 address assigned via the router IIRC, so likewise I don't think I could perform an IPv6 ping.
However on that same local dev system, I could have two IPv6 containers connect to each other via IPv6, and I could do this with two remote VPS instances (with/without containers). I can't recall if the local device lacking an IPv6 connected network interface on the host could make outbound IPv6 though via the IPv6 enabled containers to those VPS instances though, presumably not.
So specifically 6to6 routing from me into my NAS isn't working.
I suppose in your situation my first step towards troubleshooting would be to confirm this is a docker specific concern.
Can you run a service on the NAS without a container involved, and connect to that via IPv6 successfully unlike via a container?
If not then your issue isn't docker specific. You'll need to resolve that on your end as it's probably specific to your environment.
If you are successful, then host mode networking on the container should also work I think for IPv6, and if so then the problem can be isolated to the bridged network.
I know on Fedora VPS I had encountered some networking related issues, one was with the firewalld service IIRC, where the network is associated to a zone and needs to be permitted for added connectivity from external clients.
Docker networks have also had some changes over recent releases that affect network modes. I don't think these were documented as well at the time I came across them, but I know they were mentioned in the release changelogs. It's possible you might be affected there and just need to adjust those settings for the bridge network. I also recall the changelog mentioning some regressions related to that which were fixed, so it's important you go through that information to double check you're not running a release of Docker that has that issue 😅
Are you running Docker installed/managed by a NAS? Or did you install Docker from their official third-party repo?
Server: Docker Engine - Community
Engine:
Version: 27.1.2-qnap4
I maintain a dockerized project that often has niche problems like network or filesystem/permission related for users that run the containers on a NAS. Sometimes this is due to heavily modified and/or outdated kernels, or in your case I guess perhaps modified defaults that don't match upstream Docker?
Except for running as root I don't believe Qnap is doing anything weird.
I suppose in your situation my first step towards troubleshooting would be to confirm this is a docker specific concern.
Can you run a service on the NAS without a container involved, and connect to that via IPv6 successfully unlike via a container?
All the rest of my Qnap crap is on the host IP, and I have had containers run bridged to host (ATM I can't remember if I tried to IPV6 at that time) https://[fe80::265e:beff:fe6b:ae54]/ OR https://[2607::]/ works for anything running on eth0.
If not then your issue isn't docker specific. You'll need to resolve that on your end as it's probably specific to your environment.
If you are successful, then host mode networking on the container should also work I think for IPv6, and if so then the problem can be isolated to the bridged network.
I believe it's all docker bridge specific. Again I can attach to containers and use ipv6 to ping/wget/whatever.
Docker networks have also had some changes over recent releases that affect network modes.
I think this is where I'm at. I don't think I need to change anything else, I need a updated version of docker...
It is nice that I have working ipv6 inside containers.
MAYBE I'm one ip6tables rule off having this work but it's been ages since I touched OpenWRT and I've forgotten most of my knowledge. I also never did ipv6 back then so....
If you can try with a VPS environment where the latest Docker is working correctly, you could try revert the version of Docker installed to see if it's due to something fixed or if it's something else about your NAS environment.
The official Docker package repo for Fedora for example has different versions of Docker you can install (although the latest docs guidance is a bit outdated last I checked since Fedora migrated to DNF5), might be similar for other distros they document support for.
That may be the easiest way forward for you if you'd like to troubleshoot some more and optionally open a bug report upstream at the moby repos (or contact QNAP) if there's no issue reproduced from the VPS environment with Docker vs your NAS product.
Activity
bephinix commentedon Nov 30, 2020
@robbertkl I think we should keep it up until built-in IPv6 NAT is rolled out for most distributions.
In addition to this, it is required to check if built-in IPv6 NAT behaves the same way docker-ipv6nat does. 😉
robbertkl commentedon Nov 30, 2020
Exactly, agree 100%! I wanted to use this issue to share findings on behavior of built-in IPv6 NAT. After confirming this tool is no longer needed, I wanted to deprecate it with a README message, but still keep it available until the built-in IPv6 NAT is widespread.
bboehmke commentedon Dec 1, 2020
We should also track moby/moby#41622 because this is the requirement to enable the IPv6 NAT in the docker daemon.
Many thanks also for the great work on this project, it has made my work with IPv6 and docker much easier.
J0WI commentedon Dec 10, 2020
Docker 20.10 with IPv6 NAT is out but it has some serious issues: moby/moby#41774
johntdavis84 commentedon Jan 1, 2021
I was actually coming here to open a ticket about this very thing. :)
The latest stable update on Manjaro included Docker 20.10, and I saw the new ipv6nat functionality--and read the long thread of people trying to figure out exactly how it should work, here: moby/moby#41622
It sounds like it's very much still experimental? I'm not sure how to check whether a feature is considered experimental or not?
In the meantime, if we've been using
docker-ipv6natwithout issue, can we just continue as we were, or will the new built-in tools break it? I'd prefer not to switch until it's had at least a few months for the most critical bugs to be worked out.(It's also amazing to me--in a good way--that the official Docker release is implementing IPv6 NAT after months/years of philosophical pushback about that NAT'ing IPv6 being Wrong®. Maybe it is in most contexts, but it's clearly the best way to go in Docker, given how seamless v4 NAT'ing is with containers.
Thanks for all your work on this. I could never have used IPv6 before this point on docker without your work. :)
robbertkl commentedon Jan 1, 2021
I have no intentions of pulling the plug until we can all agree Docker offers the same functionality (and stability). Of course, I'll be hesitant to add new features to docker-ipv6nat when it might be deprecated "soonish". We're keeping an eye on the development within Docker, and currently have no reason to think it will break docker-ipv6nat if you keep it disabled. Thanks for the support @johntdavis84 !
bboehmke commentedon Jan 5, 2021
Finally with release 20.10.2 the upstream IPv6 NAT seems to work now.
If you want to give it a try simply add the following lines to the
/etc/docker/daemon.json:{ "experimental": true, "ip6tables": true }and configure the IPv6 the same way as for this container (see https://github.com/robbertkl/docker-ipv6nat#docker-ipv6-configuration)
J0WI commentedon Jan 6, 2021
There's a regression in 20.10.2:
moby/moby#41858
moby/libnetwork#2607
johntdavis84 commentedon Jan 6, 2021
robbertkl commentedon Jan 6, 2021
No collaborating, I think they rolled it from scratch. That makes most sense, as they can mirror the internal workings of the IPv4 NAT. Docker-ipv6nat is set up as an external listener, so doesn't make much sense to draw from this codebase.
I agree that it seems they're very much on top of things. Since the decision was made to make it part of Docker, they're taking it seriously.
johntdavis84 commentedon Jan 6, 2021
fnkr commentedon Jan 6, 2021
Has anyone tried enabling IPv6 NAT for the default bridge network? In my case dockerd tries to execute a wrong command and crashes. Reported it here: moby/moby#41861
thedejavunl commentedon Apr 13, 2021
Hi all,
With Docker 20.10.6 the ipv6nat function is fully intergrated (experimental).
You can add the following flags to your daemon.json:
{ "ipv6": true, "fixed-cidr-v6": "fd00::/80", "experimental": true, "ip6tables": true }johntdavis84 commentedon Apr 13, 2021
Thanks for the update. How does this compare to the earlier updates that enabled/tweaked IPv6 NAT? Is it considered feature complete now/lacking known bugs?
I found this in the release notes:
35 remaining items
LeVraiRoiDHyrule commentedon Mar 12, 2024
You are both right. It had nothing to see with anything of that. For an obscure reason, my daemon.json got entirely deleted so ipv6 was half-working, which caused client ip to be masked. userland-proxy indeed preserves client ip as I have now restored my daemon.json and it all works perfectly. I'm very sorry for bothering you with false lead.
I now need to find out what could have caused this, but that's an entirely different issue I will search for myself.
saltydk commentedon Mar 12, 2024
If you install docker with a package manager or Nvidia container toolkit thing they have had instances of outright replacing that file in the past.
robbertkl commentedon Mar 12, 2024
No worries, happy to help and good to hear it's working now!
polarathene commentedon Mar 12, 2024
Bit of a big reply, and mostly redundant now since the cause was found, but maybe below has some value for others as reference 😅
Misconfigured IPv6
userland-proxy: true+ip6tables: false(defaults indaemon.json)This would have been due to the
daemon.jsonmisconfig issue you discovered.ip6tables: true+experimental: trueis required for the proper routing rules to be applied by Docker whenuserland-proxy: trueis active.Since an IPv6 address was assigned to the container, the proxy routed to that through the IPv6 network gateway IP. It's the same behaviour as you'd get with the IPv4 one, and IIRC is
userland-proxy: truetrying to be helpful since there is no proper IPv6 routing rules in place (ip6tables).Once you had that correctly applied, it worked properly. Doesn't seem like I address that in the DMS docs, but it is a gotcha I recall experiencing too when I was researching this. I should probably mention that caveat, so thanks for bringing it to my attention 👍
Correctly applying changes to
daemon.jsonDocker v25 change with IPv6 (edit: collapsed as unlikely)
What version of Docker are you running on?
v25 introduced a change (and maybe they backported to v23/v24) which will automatically/implicitly enable IPv6 in daemon config if a container assigns an IPv6 address I think. EDIT: Seems related to setting
ipv6: trueper network with an IPv6 subnet assigned,daemon.jsonhas anipv6setting for the legacy bridgedocker0(typically not relevant tocompose.yaml)Perhaps there was a bug there from that change? 🤷♂️ I haven't tried it and I'm not sure if it explicitly updates the
daemon.jsonconfig file, or if it's just a runtime thing. EDIT: It was reverted for Docker v25.03 (Feb 2024) as it mistakenly enforced IPv6 with networks incompose.yamlthat setenable_ipv6: false.Other than that, you have to make sure you run
systemctl restart dockerto apply the changes made todaemon.json, a reload isn't sufficient IIRC.daemon.jsonreplaced when associated package updatesIf that happens, you can use a systemd unit drop-in override to provide your own command to run
dockerdwhich points to your owndaemon.jsonfile. That should avoid any surprises there?userland-proxy: trueEnabled (default) vs Disabled
There are some differences in the routing, the referenced docs issue of mine details these here:
Which I later try to present via a table for comparison (not entirely complete, lost a latter revision and didn't have time to repeat testing):
So it really depends on if you need containers to talk to each other or between the host. Some of those are resolvable and I shared how to adjust the rules but I don't think any of them were since upstreamed. If you only have remote connections where client IP is a concern, then it's really only the IPv6 one which
userland-proxy: falseresolves.May eventually be disabled by default + future replacement for
iptables/ip6tablesYes
userland-proxy: trueis default and has been for a long time.There is a separate issue for tracking when that'll be changed, but the Docker devs want to minimize the differences I documented above AFAIK. I don't think they can keep the IPv6 localhost routing without
userland-proxy: truehowever, so if anyone relied on that for some reason it'd be a breaking change.There's also an alternative approach with a new networking mode/driver, which is intended to replace
iptablesbased routing in future as a new default AFAIK. Not sure if much progress has been made on that since it's announcement.References:
Performance boost with
userland-proxy: falseFor @LeVraiRoiDHyrule this is another difference, skipping the proxy will avoid some overhead which improves throughput if you have a need for network I/O and want it to match performance outside of a container better. I recall a
iperf3test doubled in throughput withuserland-proxy: false.johntdavis84 commentedon Jun 9, 2025
Hello!
Cleaning out my older emails, I saw this thread and clicked through. I was surprised it's still open. Is this software fully depreciated now, or is Docker's builtin support still not quite there?
@robbertkl Thanks again for all your work on this. I'm not using Docker as much anymore (I've gotten sucked into the Proxmox vortex), but when I was I never would've gotten IPv6 working without this.
robbertkl commentedon Jun 9, 2025
Hi @johntdavis84! Docker's built-in functionality seems to work fine; I'm not maintaining this repo anymore.
Actually, it seems it finally went out of "experimental" in Docker v27: https://docs.docker.com/engine/release-notes/27/#ipv6
svengo commentedon Jun 9, 2025
Thank you for your work, robbertkl! Perhaps you could archive the repository to indicate that it is no longer maintained.
johntdavis84 commentedon Jun 9, 2025
weedy commentedon Jul 27, 2025
I wonder if someone can tell me what I'm missing. This is what I have.
Docker version 27.1.2
The relevant containers get IPs in 172.27.1.0/24 and fd00:69:420:42::/64. Inside out connectivity seems to be fine. But I can't connect to services from outside.
ipv4 is fine
https://thevault.local:9043/#!/3/docker/dashboardipv6 is not
https://[fe80::265e:beff:fe6b:ae54]:9043/#!/3/docker/dashboardORhttps://[2607::]:9043/#!/3/docker/dashboardBridged to host and the host webUI itself on
https://[fe80::265e:beff:fe6b:ae54]/ORhttps://[2607::]/works.So specifically 6to6 routing from me into my NAS isn't working.
Should I see anything in
ip6tables -t mangle --list?-t filterand-t natare full, and I have ipv6 connectivity in containers so I think I've done everything right.polarathene commentedon Jul 28, 2025
You should not need this project anymore AFAIK, just setup IPv6 on your containers the standard way should be fine?
The
fixed-cidr-v6setting is specifically for Docker's legacydocker0default bridge network AFAIK, so don't try to assign a user-defined network to that which has different network routing rules managed by Docker than it's legacy bridge.You may also want to look at disabling the
userland-proxyby setting that to false in yourdaemon.jsonconfig too. When it's true (default) it can route external IPv6 connections to IPv4 in a container when there's no IPv6 setup for the container, and that loses the original client IP.I also recall that some of these settings (at least the
userland-proxy) were (and may still) have side effects when changing and applying a restart of the daemon, instead you might have a more reliable troubleshooting experience by restarting the system after changes todaemon.jsonif things aren't acting as expected.I think I already touched on this advice earlier in May 2024 above I think, but as new comments are added that'll soon get buried/hidden from Github UI collapsing the middle of the discussion here, so I'm linking it in this comment for better discoverability 😅
You may want to also try update to newer Docker if you can as I think there's been various networking fixes/improvements, check their release changelog page (it's on their docs) and look for network changes since your current release.
When you have
userland-proxy: true(default) this does adjust some kernel related settings, and at least previously I think IPv4 and IPv6 weren't at parity, so there's a chance that is affecting you. Also see the link to my earlier comment I mentioned where I show a connectivity table based on how this setting affects connectivity success based on where the connection is made from and to. That table might be a little outdated, I haven't tested it since.weedy commentedon Jul 28, 2025
So
And my manually made bridge with --ipv6 should be the way?
Also looks like I never had the proxy running.
unable to configure the Docker daemon with file /share/ZFS530_DATA/.qpkg/container-station/etc/docker.json: the following directives are specified both as a flag and in the configuration file: userland-proxy: (from flag: false, from file: false)This is the cleanest iptables dump I've seen since I started this.
I still can't get from my PC or phone to my containers, my containers still have outbound ipv6 working.
Docker version is 27.1.2
polarathene commentedon Jul 30, 2025
Are you running Docker installed/managed by a NAS? Or did you install Docker from their official third-party repo?
I maintain a dockerized project that often has niche problems like network or filesystem/permission related for users that run the containers on a NAS. Sometimes this is due to heavily modified and/or outdated kernels, or in your case I guess perhaps modified defaults that don't match upstream Docker?
FWIW I tend to prefer using Docker Compose most of the time, but it should be fine with Docker CLI. I have had IPv6 working on several VPS instances, although my local devices could not connect to them as they did not have IPv6 address assigned via the router IIRC, so likewise I don't think I could perform an IPv6 ping.
However on that same local dev system, I could have two IPv6 containers connect to each other via IPv6, and I could do this with two remote VPS instances (with/without containers). I can't recall if the local device lacking an IPv6 connected network interface on the host could make outbound IPv6 though via the IPv6 enabled containers to those VPS instances though, presumably not.
I suppose in your situation my first step towards troubleshooting would be to confirm this is a docker specific concern.
Can you run a service on the NAS without a container involved, and connect to that via IPv6 successfully unlike via a container?
I know on Fedora VPS I had encountered some networking related issues, one was with the firewalld service IIRC, where the network is associated to a zone and needs to be permitted for added connectivity from external clients.
Docker networks have also had some changes over recent releases that affect network modes. I don't think these were documented as well at the time I came across them, but I know they were mentioned in the release changelogs. It's possible you might be affected there and just need to adjust those settings for the bridge network. I also recall the changelog mentioning some regressions related to that which were fixed, so it's important you go through that information to double check you're not running a release of Docker that has that issue 😅
weedy commentedon Jul 31, 2025
Server: Docker Engine - Community
Engine:
Version: 27.1.2-qnap4
Except for running as root I don't believe Qnap is doing anything weird.
All the rest of my Qnap crap is on the host IP, and I have had containers run bridged to host (ATM I can't remember if I tried to IPV6 at that time)
https://[fe80::265e:beff:fe6b:ae54]/ORhttps://[2607::]/works for anything running on eth0.I believe it's all docker bridge specific. Again I can attach to containers and use ipv6 to ping/wget/whatever.
I think this is where I'm at. I don't think I need to change anything else, I need a updated version of docker...
It is nice that I have working ipv6 inside containers.
MAYBE I'm one ip6tables rule off having this work but it's been ages since I touched OpenWRT and I've forgotten most of my knowledge. I also never did ipv6 back then so....
polarathene commentedon Jul 31, 2025
Yeah sorry, can't be of much more help there.
If you can try with a VPS environment where the latest Docker is working correctly, you could try revert the version of Docker installed to see if it's due to something fixed or if it's something else about your NAS environment.
The official Docker package repo for Fedora for example has different versions of Docker you can install (although the latest docs guidance is a bit outdated last I checked since Fedora migrated to DNF5), might be similar for other distros they document support for.
That may be the easiest way forward for you if you'd like to troubleshoot some more and optionally open a bug report upstream at the moby repos (or contact QNAP) if there's no issue reproduced from the VPS environment with Docker vs your NAS product.
Bond246 commentedon Oct 14, 2026
I'm a little bit late to this party.
My Docker daemon is on v29.
So as it looks like i just could disable this container and i'm still happy with ipv6 in docker?
I have this container since many years 😀