Skip to content
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

Enable ipv6 connection & tunneling #1114

Merged
merged 10 commits into from
Sep 14, 2022
Merged

Enable ipv6 connection & tunneling #1114

merged 10 commits into from
Sep 14, 2022

Conversation

EkilDeew
Copy link
Contributor

@EkilDeew EkilDeew commented Aug 22, 2022

Enable ipv6 connection to Wireguard VPN servers & tunneling for IPv6 addresses.

There's still things to be done such as:

  • use IPv6 by default and fallback to IPv4 if not functioning.
  • check if IPv6 is enabled on host before attempting to contact an IPv6 server

Fixes #154
Might help #594

Copy link
Owner

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!!

check if IPv6 is enabled on host before attempting to contact an IPv6 server

I think this is already done for example in the doIPv6 boolean in internal/wireguard.

use IPv6 by default and fallback to IPv4 if not functioning.

Call me a chicken, but I would rather have this as ipv4 first since most vpns don't support ipv6, let alone common systems/docker installs as well.

I'll do a gluetun release shortly since merging this will likely break some setups I would guess.

@EkilDeew
Copy link
Contributor Author

Call me a chicken, but I would rather have this as ipv4 first since most vpns don't support ipv6, let alone common systems/docker installs as well.

You're completely right, i often forget how docker networks behaves 😅

@EkilDeew EkilDeew force-pushed the ipv6 branch 2 times, most recently from f929548 to 03bb857 Compare August 24, 2022 21:36
Copy link
Owner

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments, I'll test it out this weekend 👍

qdm12
qdm12 previously approved these changes Sep 5, 2022
Copy link
Owner

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

What provider do you use with IPv6 addresses by the way? Or is it the custom provider? Thanks!

qdm12
qdm12 previously approved these changes Sep 5, 2022
@qdm12
Copy link
Owner

qdm12 commented Sep 5, 2022

It's looking good. Note I rebased your branch on the master branch and added a few commits, so you might need to git reset --hard origin/ipv6 on your end before doing modifications again.

I will soon fix up GetConnection to only return IPv6 VPN server endpoints if IPv6 is supported, otherwise it will break a lot of setups only working with ipv4.

@qdm12
Copy link
Owner

qdm12 commented Sep 6, 2022

This is the order of things I'm using for IPv6-ing everything:

  • IPv6 support detection for Wireguard - already in place for some time now
  • IPv6 support detection for OpenVPN - done in commit 5ddd703 for the latest image. It now uses the same IPv6 support detection as Wireguard (disabling the effect of OPENVPN_IPV6=on). I'm going to let it seat there for a few days to see if anyone complains about it on OpenVPN with IPv6-enabled systems. If you have an OpenVPN server to try it against, please have a go at it 😉 (I don't have ipv6 setup on my network / nor on docker).
  • Pick IPv6 VPN endpoints ONLY if IPv6 is supported (will do it on master branch after point above is proven to work)
  • Handling firewall, routing and rules for IPv6 (this PR) - will rebase this branch on master after the above is done

@qdm12
Copy link
Owner

qdm12 commented Sep 14, 2022

@EkilDeew the whole series mentioned above is now complete, so merging this! Feel free to re-test the latest image to check it works as expected. You should also be able to connect to VPN servers over IPv6 (picked at random together with IPv4 though, unless you set the VPN_ENDPOINT_IP I think)

@qdm12 qdm12 merged commit 875690a into qdm12:master Sep 14, 2022
CMarcJoubert pushed a commit to FideresDev/gluetun that referenced this pull request Jan 14, 2025
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Firewall configuration for ipv6
2 participants