-
Notifications
You must be signed in to change notification settings - Fork 141
system configuration/wireguard: suggest using NetworkManager #653
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
base: main
Are you sure you want to change the base?
Conversation
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.
Mostly LGTM. Some nits. Maybe let's keep the "existing" wg-quick path as a second section at the bottom of this page?
and thanks for working on this! |
@jbtrystram can you update this one? |
public key: <client_one_public_key> | ||
private key: (hidden) | ||
listening port: 51821 | ||
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.
Let's skip keep this one for readability?
wg-quick is working without issues now. Also add example on how to use NetworkManager.
---- | ||
systemd: | ||
units: | ||
- name: import-wireguard-config.service |
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.
Same idea with the names here:
- name: import-wireguard-config.service | |
- name: import-wireguard-config@wg0.service |
enabled: true | ||
contents: | | ||
[Unit] | ||
ConditionPathExists=!/etc/NetworkManager/system-connections/wg0.nmconnection |
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.
ConditionPathExists=!/etc/NetworkManager/system-connections/wg0.nmconnection | |
ConditionPathExists=!/etc/NetworkManager/system-connections/%i.nmconnection |
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=nmcli connection import type wireguard file /etc/wireguard/wg0.conf |
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.
ExecStart=nmcli connection import type wireguard file /etc/wireguard/wg0.conf | |
ExecStart=nmcli connection import type wireguard file /etc/wireguard/%i.conf |
[source,bash] | ||
---- | ||
[core@wireguard-demo ~]$ sudo wg show | ||
[core@wireguard-demo ~]# sudo wg show |
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.
I think we have '$' for user shells and '#' for root ones
[core@wireguard-demo ~]# sudo wg show | |
[core@wireguard-demo ~]$ sudo wg show |
allowed ips: 192.168.71.0/24, fdc9:3c6b:21c7:e6bd::/64 | ||
[root@wireguard-demo ~]# ip a s wg0 | ||
[core@wireguard-demo ~]# sudo ip a s wg0 |
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.
[core@wireguard-demo ~]# sudo ip a s wg0 | |
[core@wireguard-demo ~]$ sudo ip a s wg0 |
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.
Some minor comments but LGTM 👍🏻
Show how to set up wireguard with networkManager on FCOS. The wg-quick approach had selinux issues for a while now.
coreos/fedora-coreos-tracker#1487 (comment) prompted this update.