-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Feature request: Env variable to disable IPv6 auto-enable #1563
Comments
Why do you need this? What's the use case? |
@qdm12 If I use |
Ok that's interesting, maybe a better way to address this would be to fix the IPv6 detection mechanism 😉 The mechanism right now is gluetun/internal/netlink/ipv6.go Line 9 in 3100cc1
Maybe you do have IPv6 enabled on your machine, but not on your network?? In which case, adding an extra step to query an IPv6 address and see if it works would do I think 🤔 |
So AFAIK, YMMV et al, the definition of IPv6 detection is the (enabled) state in Sysctl. https://serverfault.com/questions/660979/how-to-disable-ipv6-support-in-linux-entirely I know it is not specifically what you asked, but... Regarding autodetection, the multitude of ways how IPv6 can be utilized is quite wast and just like the realization in #1648 indicates the current detection fails due to being done before actually setting the IPv6 address and getting a IPv6 route (no local IPv6 connectivity, only remote (VPN) IPv6 connectivity, proxies, net-containers, etc). It might not even matter if IPv6 is configured or not (even if only enabled), firewall rules should still be set nonetheless etc, principally a IPv6 address might pop-up at any time and the default configuration should account for it. https://docs.docker.com/engine/reference/run/#network-settings AFAIK, YMMV et al, a sidenote on the technicalities of IPv6 disabling/enabling, in containers it is inherited by the container from the host, or kernel tuned via sysctl by the container engine (also remebering container namespacing). Obviously a complimentary environment variable is fully valid in ADDITION to the actual implementation, (it is considered courteous to notify of this circumstance in the setting description/documentation, for guidance toward proper configuration) The decision made here might define the longevitiy and suitability of this project (i.e. compliance, compatibility). |
|
@qriff interesting points, I am thinking to add an ipv6 dummy route to test for ipv6 support, instead of checking existing routes for IPv6 source or destination. Would you have any suggestion of what |
This also happens with airvpn as I have blocked IPv6 outbound (via network policy in Kubernetes), and it stil tries to connect via v6. For reference (inside gluetun container):
|
Can we please have the ability to disable the ipv6 checks? I can't use the firewall and port forward at all because Synology the lame buggers won't update the ipv6 table... So many people are having this issue :( <3
|
Just uploading my docker file. custom.conf
Custom docker network docker-compose.yml
|
I have also followed this and same issue :( - https://serverfault.com/questions/660979/how-to-disable-ipv6-support-in-linux-entirely |
The issue is that if you disable IPv6 inside the container, the container will stop connecting to v6 endpoints but it will also lose connectivity through the tunnel. Ideally you would get both v4 and v6 through the tunnel regardless of whether the host is v4 only, v6 only or dual stack. It seems that the docker daemon will provide routes to v6 routable addresses regardless of whether the host has connectivity. Could the container at least ping the address for the endpoint before connecting. (Maybe a 1s timeout, defaulting to v6, then trying v4, then throwing an error)? It doesn't really leak much, but you'd give up the idea of "all traffic" going through the tunnel. |
What's the feature 🧐
Allow us to complete disable IPv6, instead of automatically checking if our system supports it.
https://github.com/qdm12/gluetun/blob/master/internal/netlink/ipv6.go#L9
https://github.com/qdm12/gluetun/blob/master/internal/provider/utils/wireguard.go#L12
https://github.com/qdm12/gluetun/blob/master/internal/wireguard/address.go#L14
https://github.com/qdm12/gluetun/blob/master/internal/configuration/sources/env/wireguard.go#L12
Something like a env variable that goes into the user settings. Looks like the wireguard is already checking that setting so as long as we can pass it as an override, this will work for anyone that has the same setup.
Extra information and references
No response
The text was updated successfully, but these errors were encountered: