Power & Source of Big Ideas

wireguard with R5S

Moderators: chensy, FATechsupport

hello
it looks like wireguard is not working for latest version of FriendlyWrt. Logs said "the protocol not supported". Is it known bug? wireguard is included in default kernel. I use wireguard successfully on R2S and never saw errors like that. Please help to understand
I'm also unable to configure WireGuard on my R5S using FriendlyWRT.

I've tried using both the official FriendlyWRT+Docker download from the Google Drive link (rk3568-sd-friendlywrt-21.02-docker-20220614.img) and a custom-compiled version where I've confirmed that WireGuard is configured to be built into the kernel (friendlywrt_22.03_20220718_nanopi-r5s_arm64_sd.img.gz). In both cases, I'm unable to configure a WireGuard interface:

Code: Select all

# ip link add dev wg0 type wireguard
RTNETLINK answers: Not supported


In the process of investigating this, I tried to compile the kmod-wireguard package myself. The version of the kernel module package provided upstream in OpenWRT doesn't work, because it's meant for kernel 5.4. I also can't find an upstream OpenWRT release candidate version that uses kernel 5.10.66. The earliest one (rc1) starts at kernel 5.10.112, and all subsequent release candidate versions are newer.

Has anyone else successfully used WireGuard on the R5S yet?
I also just tried to install wireguard-go from https://github.com/seud0nym/openwrt-wireguard-go. This also failed. wireguard-go requires the TUN kernel module. According to /proc/config.gz, the default kernel for the RS5 is compiled with CONFIG_TUN=m, and the kmod-tun package available from the OpenWRT package repositories is incompatible with the default kernel.

I attempted to override the check in wireguard-go's installer which checked for CONFIG_TUN=y, and it failed with this set of errors:

Code: Select all

Installing wireguard-go (2022.08.20) to root...
Configuring wireguard-go.
sysctl: write error: error code 9
sysctl: write error: error code 9
sysctl: write error: error code 9
sysctl: write error: error code 9
sysctl: write error: error code 9
sysctl: write error: error code 9
sysctl: write error: error code 9
uci: Entry not found
sysctl: separators should not be repeated: ..accept_ra

Given that nobody has replied to this thread so far, and this is the same root cause as the WireGuard kernel module being missing, I'm not hopeful that anyone will have advice about this either…
I have this working with 22.03 (non-docker). I just installed luci-app-wireguard and luci-proto-wireguard (along with dependencies) and setup using Luci.
@jake911 Could you send the output of

Code: Select all

uname -a

please? Thanks!
For posterity, I updated to rk3568-sd-friendlywrt-22.03-20230609.img.gz, and now Wireguard works as expected. I only needed to install the wireguard-tools package, and I can now create wg interfaces with no issues. My uname -a output is below:

Code: Select all

Linux friendlywrt 5.10.110 #1 SMP Fri Jun 9 12:40:27 CST 2023 aarch64 GNU/Linux

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests