-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
backend/extension: Add Wireguard configuration #898
Conversation
Nice work :) A bit sad though that installing the Wireguard kernel module on CoreOS is a mess. |
dist/extension-wireguard
Outdated
"Backend": { | ||
"Type": "extension", | ||
"PreStartupCommand": "wg genkey | tee privatekey | wg pubkey", | ||
"PostStartupCommand": "export SUBNET_IP=`echo $SUBNET | cut -d'/' -f 1`; ip link del flannel-wg 2>/dev/null; ip link add flannel-wg type wireguard && wg set flannel-wg listen-port 8285 private-key privatekey && ip addr add $SUBNET_IP/32 dev flannel-wg && ip link set flannel-wg up && ip route add $NETWORK dev flannel-wg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why port 8285
and not 51820
(which is the default WG port (?))?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed 51820
is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll update the port.
Great to hear you all are adding WireGuard support to CoreOS. Let me know if I can be of any assistance. |
a9dd403
to
f6a0fd5
Compare
This PR adds - the wireguard tools to the flannel container images (~0.1MB size increase) - an example extensions config - a one-line change to extension.go to pass in the flannel network The tests are commented out since they won't pass unless the wireguard kernel module is loaded.
f6a0fd5
to
0641140
Compare
I have a question that might be a bit silly but I hope you'll forgive since I'm new in this: |
@eranreshef This wireguard config isn't in a release yet, so unless you really know what you're doing I wouldn't recommend it! If you need more help then maybe swing by the #flannel channel on the calico users slack (see contact info in the readme) |
Well I'm not 100% know what I'm doing but I don't mind experimenting with this.
whats wrong here? |
The config needs to look like this https://github.com/coreos/flannel/blob/master/dist/extension-wireguard Hope that helps! |
Yes it does. Thanks! |
This PR adds
size increase)
The tests are commented out since they won't pass unless the wireguard
kernel module is loaded.