+
Skip to content

Conversation

jbtrystram
Copy link
Member

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.

@jbtrystram jbtrystram requested a review from travier July 15, 2024 10:34
Copy link
Member

@travier travier left a 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?

@travier
Copy link
Member

travier commented Jul 15, 2024

and thanks for working on this!

@travier
Copy link
Member

travier commented Jun 23, 2025

@jbtrystram can you update this one?

public key: <client_one_public_key>
private key: (hidden)
listening port: 51821
Copy link
Member

@travier travier Jul 2, 2025

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
Copy link
Member

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:

Suggested change
- name: import-wireguard-config.service
- name: import-wireguard-config@wg0.service

enabled: true
contents: |
[Unit]
ConditionPathExists=!/etc/NetworkManager/system-connections/wg0.nmconnection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

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

Suggested change
[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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[core@wireguard-demo ~]# sudo ip a s wg0
[core@wireguard-demo ~]$ sudo ip a s wg0

Copy link
Member

@travier travier left a 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 👍🏻

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

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载