openwisp-controller icon indicating copy to clipboard operation
openwisp-controller copied to clipboard

[bug] Wireguard template auto tunnel provisioning breaks using IPV6

Open clutch2sft opened this issue 4 years ago • 2 comments

Setting up a Wireguard VPN and using an IPV6 network from OW IPAM works well.

When you then configure the client template to be able to associate client routers to the IPV6 VPN it doesn't work out.

What happens:

After going through the steps here: https://openwisp.io/docs/user/wireguard.html#create-vpn-client-template-for-wireguard-vpn-server

On step six after clicking on save and continue the template is populated with IPV4 instead of IPV6.

Screenshot from 2022-11-23 12-41-10

If you change the setting to IPV6 the address field is zeroed out and if you put the same thing back in that field that was there before changing to IPV6 you get an error after clicking save.

Invalid configuration triggered by "#/interfaces/0", validator says:

{'type': 'wireguard', 'private_key': '{{pvt_key_6fdfa88ac4e546c89c5cf8df22a1a0f1}}', 'port': 51820, 'mtu': 1420, 'nohostroute': False, 'fwmark': '', 'ip6prefix': [], 'addresses': [{'proto': 'static', 'family': 'ipv6', 'address': '{{ip_address_6fdfa88ac4e546c89c5cf8df22a1a0f1}}', 'mask': 128}], 'name': 'wg0', 'network': ''} is not valid under any of the given schemas

Expected behavior is that Autoconfigure should determine that the IPAM is IPV6 not IPV4 and accept the replacement var as is.

clutch2sft avatar Nov 23 '22 19:11 clutch2sft

Hi @devangpratap 👋,

Thank you for opening PR #1255 to address this issue!

GitHub did not allow the bot to assign this issue to you automatically, because you are not yet an organization member and have not previously commented on this issue.

To get assigned, please comment @openwisp-companion assign on this issue. Your comment satisfies GitHub's requirement and the bot will then assign the issue to you.

openwisp-companion avatar May 08 '26 22:05 openwisp-companion

Hi @devangpratap 👋,

Thank you for opening PR #1255 to address this issue!

GitHub did not allow the bot to assign this issue to you automatically, because you are not yet an organization member and have not previously commented on this issue.

To get assigned, please comment @openwisp-companion assign on this issue. Your comment satisfies GitHub's requirement and the bot will then assign the issue to you.

openwisp-companion avatar May 09 '26 18:05 openwisp-companion