Wireguard server on ARM

I am trying to make a WireGuard VPN server. I am able to get all the configuration in place, generating keys and all, but when I go to actually start the server, I get errors from systemctl:

Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xeu wg-quick@wg0.service" for details.

When I check the two suggested comands, I am greeted with the same error from both of them:

wg-quick[304457]: [#] ip link add wg0 type wireguard
wg-quick[304467]: Error: Unknown device type.
wg-quick[304470]: Unable to access interface: Protocol not supported
wg-quick[304457]: [#] ip link delete dev wg0
wg-quick[304472]: Cannot find device "wg0"
systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE

From my research, this points to the kernel modules not being loaded, so after double-checking wireguard-dkms was installed, I ran sudo modprobe wireguard totry loading it. From that, I got this error:

modprobe: FATAL: Module wireguard not found in directory /lib/modules/5.10.31-1-MANJARO-ARM

Which is weird because /lib/modules/5.10.31-1-MANJARO-ARM isn’t even a folder on my system. I tried loading the module with insmod /lib/modules/5.10.43-1-MANJARO-ARM/kernel/drivers/net/wireguard/wireguard.ko too, just to make sure it wouldn’t work, and I got this error:

insmod: ERROR: could not insert module /lib/modules/5.10.43-1-MANJARO-ARM/kernel/drivers/net/wireguard/wireguard.ko: Invalid module format

A stackoverflow answer suggested I try installing linux-headers over linux-rpi4-headers, so I did, but it didn’t seem to change anything, so I switched it back. I’m pretty lost. I have tried configuring the server on my desktop (running x86 manjaro) and it worked just fine, so I’m really not sure what to do.

Just to be sure. Reboot your device. You might have updated the kernel without rebooting, making loading new modules not work.

1 Like

It worked! I should have tried rebooting. Thank you for suggesting that. Now I need to beat my uptime record of 55 days lol. Have a nice day!

This should not be installed after @kernel 5.7 when they added support to the kernel for wireguard.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.