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
Job for firstname.lastname@example.org failed because the control process exited with error code. See "systemctl status email@example.com" and "journalctl -xeu firstname.lastname@example.org" for details.
When I check the two suggested comands, I am greeted with the same error from both of them:
wg-quick: [#] ip link add wg0 type wireguard wg-quick: Error: Unknown device type. wg-quick: Unable to access interface: Protocol not supported wg-quick: [#] ip link delete dev wg0 wg-quick: Cannot find device "wg0" systemd: email@example.com: 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-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.