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

[FEAT] IPv6 subnet support #346

Open
1 task done
simonmysun opened this issue Jul 16, 2024 · 7 comments
Open
1 task done

[FEAT] IPv6 subnet support #346

simonmysun opened this issue Jul 16, 2024 · 7 comments
Labels
enhancement New feature or request work-in-progress Stale exempt

Comments

@simonmysun
Copy link

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I look forward to supports for IPv6 subnet. Currently /root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run is based on the assumption that users only uses IPv4 for wireguard traffics. However, both docker and wireguard are IPv6 ready. I have manually adjusted the config files to allocate IPv6 addresses to the wg peers. It will be wiped away when there is any change in docker environment variables and I will have to manually revert the changes. I would appreciate if IPv6 configuration was supported and I would be happy to adjust my set up to follow the change.

Reason for change

Docker and wireguard are IPv6 ready. IPv4 will be phased out in the future. This is a change that has to made sooner or later.

Proposed code change

No response

@simonmysun simonmysun added the enhancement New feature or request label Jul 16, 2024
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@simonmysun
Copy link
Author

Please don't. Automatic reply does not require feedback from OP.

@drizuid
Copy link
Member

drizuid commented Sep 11, 2024

i don't follow the expectation. You can see the default route supports ipv6 and ipv4, we dont want to use "private ip space" for ipv6 and we don't want to nat, so we can't provide a dump subnet. You should be assigning a properly routed subnet from your /56, /60, or /64. For example, I carve out a /112 for my docker network and allocate an ip from that to various containers, including wireguard. I then configure my conf to use that block.

This does assume you've properly configured your custom bridge to support ipv6 and that you've properly created routes for the subnet.

Can you be a bit clearer on what you are proposing we do here?

@Interna1Error
Copy link

+1 on this one. The author is probably proposing support for an environment variable similar to INTERNAL_SUBNET for IPv4, so each client and the server itself get an automatically assigned IPv6 address from the specified subnet for inter-device communication within the wireguard network. Maybe rename INTERNAL_SUBNET to INTERNAL_IPV4_SUBNET and add a new INTERNAL_IPV6_SUBNET variable?

@simonmysun
Copy link
Author

Yes. INTERNAL_SUBNET is assumed to be an IPv4 Address:

INTERFACE=$(echo "$INTERNAL_SUBNET" | awk 'BEGIN{FS=OFS="."} NF--')

Additionally when I manually allocated IPv6 addresses to the peers, they will be rewritten in generate_confs. It's difficult for me to update the peer confs because I have to either apply changes manually, or let generate_confs overwrite and then revert the changes on peer addreses.

@drizuid drizuid added the work-in-progress Stale exempt label Oct 12, 2024
@drizuid
Copy link
Member

drizuid commented Oct 13, 2024

let us discuss internally, thank you for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work-in-progress Stale exempt
Projects
Status: Issues
Development

No branches or pull requests

4 participants