6

On Ubuntu 20.04 (Focal), I was able to use the instructions outlined in this question to manage my WireGuard VPN connections through the regular Gnome VPN management. However, this is no longer working in 22.04 (Jammy). The plug-in builds just fine, I'm able to import my config file (which works if I use wg-quick up, so I don't think it's a config file issue), and the new VPN configuration appears in the list of VPNs. However, attempting to activate it results in "Activation of Network Connection Failed" and no connection made to the server.

Here is my syslog from when the connection is attempted:

Apr 26 10:33:53 eins NetworkManager[628]: <info>  [1650990833.9975] vpn[0x5579356748a0,9f61621d-bde7-4714-a668-84cb5fec16b0,"wg0"]: starting wireguard
Apr 26 10:33:53 eins NetworkManager[628]: <info>  [1650990833.9987] audit: op="connection-activate" uuid="9f61621d-bde7-4714-a668-84cb5fec16b0" name="wg0" pid=57075 uid=1000 result="success"
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip link add wg0 type wireguard
Apr 26 10:33:54 eins NetworkManager[59112]: [#] wg setconf wg0 /dev/fd/63
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0255] manager: (wg0): new WireGuard device (/org/freedesktop/NetworkManager/Devices/19)
Apr 26 10:33:54 eins systemd-udevd[59126]: Using default interface naming scheme 'v249'.
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip -4 address add 10.252.1.3/32 dev wg0
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip link set mtu 1420 up dev wg0
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0325] device (wg0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0328] device (wg0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[59142]: [#] resolvconf -a tun.wg0 -m 0 -x
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0333] device (wg0): Activation: starting connection 'wg0' (5d9bcb5e-0485-4422-8466-24a04ff77b9f)
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0334] device (wg0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0336] device (wg0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0337] device (wg0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0339] device (wg0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins dbus-daemon[626]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.11' (uid=0 pid=628 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Apr 26 10:33:54 eins NetworkManager[59112]: [#] wg set wg0 fwmark 51820
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip -4 rule add not fwmark 51820 table 51820
Apr 26 10:33:54 eins NetworkManager[59112]: [#] ip -4 rule add table main suppress_prefixlength 0
Apr 26 10:33:54 eins NetworkManager[59112]: [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
Apr 26 10:33:54 eins NetworkManager[59112]: [#] nft -f /dev/fd/63
Apr 26 10:33:54 eins nm-wireguard-se[59109]: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed
Apr 26 10:33:54 eins nm-wireguard-se[59109]: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
Apr 26 10:33:54 eins NetworkManager[628]: <warn>  [1650990834.0568] vpn[0x5579356748a0,9f61621d-bde7-4714-a668-84cb5fec16b0,"wg0",if:17,dev:3:(wg0)]: config: no VPN gateway address received
Apr 26 10:33:54 eins NetworkManager[628]: <warn>  [1650990834.0568] vpn[0x5579356748a0,9f61621d-bde7-4714-a668-84cb5fec16b0,"wg0",if:17,dev:3:(wg0)]: did not receive valid IP config information
Apr 26 10:33:54 eins systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 26 10:33:54 eins NetworkManager[59185]: [#] ip -4 rule delete table 51820
Apr 26 10:33:54 eins NetworkManager[59185]: [#] ip -4 rule delete table main suppress_prefixlength 0
Apr 26 10:33:54 eins dbus-daemon[626]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 26 10:33:54 eins systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0715] device (wg0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0716] device (wg0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0719] device (wg0): Activation: successful, device activated.
Apr 26 10:33:54 eins NetworkManager[59185]: [#] ip link delete dev wg0
Apr 26 10:33:54 eins NetworkManager[628]: <info>  [1650990834.0803] device (wg0): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
Apr 26 10:33:54 eins gnome-shell[2576]: Removing a network device that was not added
Apr 26 10:33:54 eins NetworkManager[59185]: [#] resolvconf -d tun.wg0 -f
Apr 26 10:33:54 eins NetworkManager[59185]: [#] nft -f /dev/fd/63
3
  • Same issue , Is there any update ? May 1, 2022 at 6:01
  • 2
    Not yet. I'm working on a Gnome extension that works with nmcli and adds a little indicator and toggle as a personal work-around, but I cannot get the networkmanager-wireguard from Max Moser to work still. May 1, 2022 at 18:18
  • @DakotaBrown I've been using this for nmcli, worked well so far
    – Baa
    May 14 at 0:54

1 Answer 1

0

Had the same issue. The shell commands from here (https://www.reddit.com/r/WireGuard/comments/us1blx/comment/i9klpio/?utm_source=share&utm_medium=web2x&context=3) worked fine for me. At least the connection is now shown in the Drop-Down menu in the upper right. In the Settings-Dialog it's still missing.

Edit:

nmcli connection import type wireguard file "/path/to/wg0.conf"

nmcli connection modify wg0 connection.id "home-vpn"

nmcli connection show home-vpn

It'll not show up in Gnome Network Settings after you've imported the configuration.

To solve the problem of an automaticly activated connection after every boot you can edit the connection afterwards with nm-connection-editor and deactivate the related option.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.