-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind to IPv4 and IPv6 in haproxy #108
Conversation
Please rebase properly your branch for avoiding the merge commit. |
46390a7
to
b4be95d
Compare
Done |
@yajo do you see any side effect doing this? I barely remember that there was a problem with IPv6 that leads us to disable it. |
Git blame suggests that the setting was never changed for what it is worth. |
Docker's ipv6 support is not very good. You have moby/moby#44923 if you want to start digging into the rabbit hole. But I see this change is OK, since HAProxy should be able to bind to both just fine. And tests pass. |
OK then. @saltydk please put a proper commit message like |
FYI You can choose to squash and merge, and then put the message you like. |
OK, done that way. Thanks for the hint. |
This reverts commit 75d40ca.
This reverts commit 75d40ca.
In Docker there was a common issue if the Docker host received an IPv6 client connection but the container only had IPv4. That was a problem if you had some trust policy like "trust this private docker subnet, since any container is on the host and I trust them, but not external client IPs", since now IPv6 client connections would implicitly become trusted allowing them to bypass some security measures. Other issues it could cause are with monitoring such as logs with Fail2Ban triggering and preventing many users over IPv6 from connecting successfully once that gateway IP was banned instead of banning the actual client IP. I think that might be fixed from Docker v27 now, which should enable containers with IPv6 IPs by default when the host has an IPv6 interface available? That concern applies here since the bind is occurring within the container. Nothing to worry about here as However the syntax you merged seems off That is more evident when you look at the logs shared from this issue: #127
So while the issue was fixed by #111 it is a bit misleading in context. The fix came from the updated configuration and the user pulling the proper updated image (once released, and potentially IIRC with compose recreating a container if you modify ENV which is what the user did). FWIW, no failures running the container (without disabling the feature via Output of `docker inspect` on the container "NetworkSettings": {
"Bridge": "",
"SandboxID": "a98fbb14fcf512b58a8a454767013e6a5b08635343faecf007cf77dfe222e532",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"2375/tcp": null
},
"SandboxKey": "/var/run/docker/netns/a98fbb14fcf5",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "d0b71988b021fa7d149b33c976b4f4183707c39d7d3c27f72c1b441cebc588ad",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:04",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "d8c3fee9357864daa2c5a5882b3dbc7e5fc57d9b00b9f3dfbb93a805c8a3ef88",
"EndpointID": "d0b71988b021fa7d149b33c976b4f4183707c39d7d3c27f72c1b441cebc588ad",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:04",
"DriverOpts": null
}
}
} |
Binds both IPv4 and IPv6 to allow IPv6 connectivity without affecting IPv4 only setups.
Issue: #107