tusc / wireguard-kmod

WireGuard for UDM series routers
https://www.wireguard.com/
350 stars 18 forks source link

Support for UDR Firmware 2.x #31

Closed brianfoshee closed 2 years ago

brianfoshee commented 2 years ago

Hello! Thanks for this project, I have it working on a UDM. However, I have an early access UDR and am unable to install because it's running a 2.x OS and a different (older?) kernel:

Firmware version: v2.2.12
Unsupported Kernel version 4.4.198-ui-mtk

I'm not sure if you would have access to the source for this yet since UDR is still early access? Otherwise happy to test it out.

peacey commented 2 years ago

Hi @brianfoshee,

We were just about to release the update for the UDR. See the latest release v11-05-21, or download it and extract via:

curl -LJo wireguard-kmod.tar.Z https://github.com/tusc/wireguard-kmod/releases/download/v11-05-21/wireguard-kmod-11-05-21.tar.Z
tar -C /data -xvzf wireguard-kmod.tar.Z

This has been tested on the UDR and seems to work. Tell us how it works for you. Thanks!

FYI, you will need to use systemd boot service to setup wireguard or start a tunnel on boot (UDR has native support for boot scripts via systemd). README will be updated soon.

brianfoshee commented 2 years ago

oh great, thank you!

I gave this a try and am still seeing the unsupported kernel message with v11-05-21:

# curl -LJo wireguard-kmod.tar.Z https://github.com/tusc/wireguard-kmod/releases/download/v11-05-21/wireguard-kmod-11-05-21.tar.Z
# tar -C /data -xvzf wireguard-kmod.tar.Z
# cd /data/wireguard/
# chmod +x setup_wireguard.sh
# ./setup_wireguard.sh
ln: failed to create symbolic link '/bin/bash': File exists
ln: failed to create symbolic link '/usr/bin/htop': File exists
ln: failed to create symbolic link '/usr/sbin/iftop': File exists
ln: failed to create symbolic link '/sbin/resolvconf': File exists
ln: failed to create symbolic link '/etc/resolvconf.conf': File exists
loading wireguard...
Unsupported Kernel version 4.4.198-ui-mtk
dailow commented 2 years ago

Thanks for posting this! I just tried it on my UDR that is on version 2.12 and it worked. Was hoping wireguard would be included by default, but glad this is a viable alternative.

brianfoshee commented 2 years ago

@peacey ah it's working now. I think the issue was that I tried running an older installer which created /mnt/data so the line in setup_wireguard.sh to set the data directory triggered on that existing.

peacey commented 2 years ago

Glad you guys got it working. Hopefully no one will have the data directory issue in the future as the release is out now.