Zuletzt aktiv 1705433154

Systemd service to activate wireguard with Fedora 33

wg0.service Orginalformat
1## Connect to Wireguard interface automatically
2## using NetworkManager.
3## wg-quick@ -systemd services do not configure
4## DNS properly when systemd-resolved is used
5## resulting in DNS leaks and general issues,
6## hence starting the interface via nmcli is
7## necessary
8
9[Unit]
10Description=wg0 interface
11After=network-online.target
12Wants=network-online.target
13
14[Service]
15Type=oneshot
16ExecStart=nmcli conn up wg0
17ExecStartPost=resolvectl flush-caches
18ExecStop=nmcli conn down wg0
19ExecStopPost=resolvectl flush-caches
20RemainAfterExit=true
21
22[Install]
23WantedBy=default.target