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

WireGuard support #14

Closed
5 tasks done
stapelberg opened this issue Nov 25, 2018 · 4 comments
Closed
5 tasks done

WireGuard support #14

stapelberg opened this issue Nov 25, 2018 · 4 comments
Assignees

Comments

@stapelberg
Copy link
Contributor

stapelberg commented Nov 25, 2018

Filing this for tracking the ongoing work.

Current status:

  • include WireGuard kernel patch in https://github.com/rtr7/kernel
  • use Linux ≥ 5.6
  • WireGuard netlink package
  • make netconfigd read a config file and create/configure WireGuard interfaces
  • netconfig: switch to wgctrl-go package
@stapelberg stapelberg self-assigned this Nov 25, 2018
stapelberg added a commit that referenced this issue Nov 26, 2018
To set up a tunnel, create a /perm/wireguard.json as illustrated in
netconfig_test.go, and don’t forget to adjust your /perm/interfaces.json with
the address configuration for the WireGuard tunnel.

Note that static routes cannot currently be configured, so the usefulness is
limited. If you have a use-case you’d like to see covered, please explain it in
#14
@mdlayher
Copy link
Contributor

Just noticed you added this! You may be interested in: https://github.com/mdlayher/wireguardctrl.

@stapelberg
Copy link
Contributor Author

That package is now at https://github.com/WireGuard/wgctrl-go. We should probably switch to it.

@stapelberg
Copy link
Contributor Author

Wireguard setup broke with kernel update rtr7/kernel@7dbe98e:

2019/07/15 09:06:11 netconfigd.go:169: wireguard: netlink receive: invalid argument

strace reveals:

[pid  1011] <... recvmsg resumed> {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=112->12, msg_iov=[{iov_base={{len=212, type=NLMSG_ERROR, flags=0, seq=881650684, pid=978}, {error=-EINVAL, msg={{len=192, type=0x1b /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK, seq=881650684, pid=978}, "\x01\x01\x00\x00\x08\x00\x02\x00\x77\x67\x30\x00\x08\x00\x05\x00\x00\x00\x00\x00\x24\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00"...}}}, iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 212

Not entirely sure what’s going on here, but haven’t looked closely yet.

@stapelberg
Copy link
Contributor Author

I split the remaining work into use-case specific issues #51 and #52 and will call this one done.

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

No branches or pull requests

2 participants