9

Hello I am very new to ubuntu, I installed wireguard almost 6 months ago, and it was working fine, untill yesterday when my ubuntu was updated, the wirguard does not want to come up, and gives the below status:

May 31 08:41:03 lenovo systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
May 31 08:41:03 lenovo wg-quick[5463]: [#] ip link add wg0 type wireguard
May 31 08:41:03 lenovo wg-quick[5463]: Error: Unknown device type.
May 31 08:41:03 lenovo wg-quick[5463]: Unable to access interface: Protocol not supported
May 31 08:41:03 lenovo wg-quick[5463]: [#] ip link delete dev wg0
May 31 08:41:03 lenovo wg-quick[5463]: Cannot find device "wg0"
May 31 08:41:03 lenovo systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, 
status=1/FAILURE
May 31 08:41:03 lenovo systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
May 31 08:41:03 lenovo systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.

here is my ubuntu version: Ubuntu 18.04.4 LTS

FedKad
  • 13,420

3 Answers3

9

Try reinstalling package wireguard-dkms (remove and install again). Probably afterwards a reboot will be needed.

2

Run the Following commands :

sudo apt-get update
sudo apt-get upgrade
sudo systemctl enable --now systemd-resolved

and reboot the system

It has worked in my case, I hope it will be helpful to you!

0

for me the dkms way proposed by @Błotosmętek worked in the beginning, but after doing an experimental systemctl restart ... it never recovered, with errors such as:

Sep 10 10:46:46 ryzen wg-quick[6005]: RTNETLINK answers: File exists
Sep 10 10:46:46 ryzen wg-quick[5915]: [#] resolvconf -d tun.wg0 -f
Sep 10 10:46:46 ryzen wg-quick[5915]: [#] ip link delete dev wg0
Sep 10 10:46:46 ryzen systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 10 10:46:46 ryzen systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Sep 10 10:46:46 ryzen systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.

Thus resorted to the networkmanager way described here: https://www.xmodulo.com/wireguard-vpn-network-manager-gui.html

dimisjim
  • 332