Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wireguard VPN - How to fix Operation not supported if it worked before?

Tags:

wireguard

Trying to get up my VPN interface with sudo wg-quick down wg0;sudo wg-quick up wg0 raised:

RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported

I am not sure what happened but the only thing I did was reboot. I did not update my packages. Still something apparently changed.

like image 430
matt3o Avatar asked Jun 13 '20 06:06

matt3o


People also ask

How do I manually set a WireGuard?

Download and install the latest version of the WireGuard client from the official WireGuard website. Navigate to our config file generator. Choose Generate key or Add key manually. Select the required Single or Multi-hop server configuration(s), Port , Internet protocol and hit Download zip archive.

Which VPNs support WireGuard ExpressVPN?

Here are the best VPNs that support WireGuard ExpressVPN — The best all-around VPN has a Lightway Protocol which makes it even faster for browsing, gaming, and streaming. CyberGhost – Easy-to-use VPN with WireGuard for Linux and iOS. Private Internet Access – Strong security features and WireGuard support for anonymity and fast speeds.

What happens if the Wireguard VPN connection is lost?

The WireGuard VPN protocol is designed stateless. Connections are considered as an interface — once they're up, they always stay up. If the connection to the VPN server is lost, the internet connection stops working until the VPN server becomes reachable again.

How many devices can I connect to WireGuard with strongvpn?

On StrongVPN, all VPN protocols, including WireGuard, allow you to have up to 12 devices connected to our VPN service. Can I select what port WireGuard uses for the VPN connection?

Why is my WireGuard rnetlink connection not working?

If you are trying to establish a WireGuard connection with a wg-quick command and receive the following error..: $ ip link add dev wg0 type wireguard RNETLINK answers: Operation not supported Unable to access interface: Protocol not supported ..most likely the wireguard kernel module is not loaded in your system.


Video Answer


2 Answers

In my case there were no appropriate kernel headers installed.

First you need to know your current kernel version:

# uname --kernel-release
4.19.0-14-cloud-amd64

Important part here is "cloud-amd64" (there are several versions of "linux-headers-..." package, use apt list linux-headers-* to see what is available).

Then install appropriate kernel headers (I'm using Debian):

# apt install linux-headers-cloud-amd64

Then re-install wireguard-dkms package:

# apt install --reinstall wireguard-dkms

Reboot your OS:

# reboot
like image 53
MiSHuTka Avatar answered Sep 23 '22 20:09

MiSHuTka


In my case (Debian 10, PiVPN) i had to:

  1. Install linux headers:
apt-get update
apt-get install linux-image-amd64 linux-headers-amd64
  1. reboot
  2. apt reinstall wireguard-dkms
  3. reboot
like image 44
Riki137 Avatar answered Sep 21 '22 20:09

Riki137