Since Wireguard is a kernel module, it needs to be built for the specific kernel currently installed. To get this to work on OSMC is possible but you really need to read this thread from post #7, since the process requires a few workarounds.
Above kernel made Wireguard work beautifully for me.
For Wireguard to work, I had to install the wireguard-dkms package, and with this, even wg-quick works flawlessly.
After October update to Buster on PI3B+ and the mandantory wireguard-dkms update with kernel header for 4.19.122-2-osmc wg-quick and service aborted with error:
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables: Invalid argument. Run `dmesg’ for more information.
Solution was the same like https://discourse.osmc.tv/t/netfilter-persistent-problem-after-upgrade-to-buster/87226
Change iptables configuration to (1) iptables-legacy
osmc@piosmc:/$ sudo update-alternatives --config iptables
There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).Selection Path Priority Status
- 0 /usr/sbin/iptables-nft 20 auto mode
1 /usr/sbin/iptables-legacy 10 manual mode
2 /usr/sbin/iptables-nft 20 manual modePress to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
Now my wireguard server is up agein
Hey all, sorry to bump this but wondering if I can get some help with my setup.
I’ve been trying for a while to set up Wireguard so I can use Plex.
For context, OSMC is setup on an RPi 3B installed in my car using composite to the factory entertainment unit.
Wireguard obviously isn’t a deal breaker but I feel I’m pretty close.
Also, if it’s just easier to update to the newer kernel linked above, please let me know. I was going to test that but didn’t want to risk breaking my install again.
Here’s where I’m at…
Setting up raspberrypi-kernel-headers (1:1.20211007-2~buster) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.63+
Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.63-v7+
Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.63-v7l+
Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.63-v8+
Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
So I worked out that I needed to use rbp1 instead of rbp2
sudo apt install rbp1-headers-$(uname -r)
But then…
Setting up rbp1-headers-4.19.122-2-osmc (2) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.122-2-osmc /boot/vmlinuz-4.19.122-2-osmc
Error! Your kernel headers for kernel 4.19.122-2-osmc cannot be found.
Please install the linux-headers-4.19.122-2-osmc package,
or use the --kernelsourcedir option to tell DKMS where it's located
Trying Wireguard again, I get this error;
Setting up wireguard-dkms (1.0.20210606-1) ...
Loading new wireguard-1.0.20210606 DKMS files...
Building for 4.19.122-2-osmc
Module build for kernel 4.19.122-2-osmc was skipped since the
kernel headers for this kernel does not seem to be installed.
This is further than I’ve gotten so far (third try with Wireguard)
Any suggestions?
Gah, borked it.
Just ordered a RPi 4, will try a newer build with that!
Well you could/should just installed lastest OSMC version on your Pi3