tusc / wireguard-kmod

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

UDM PRO SE "File exists" then WG not found in directory #60

Closed lowrisk75 closed 2 years ago

lowrisk75 commented 2 years ago

I got both splitVPN and WireGuard kernel working on a UDM PRO. I'm trying to get this install on a different UDM PRO SE,

I did

curl -LJo wireguard-kmod.tar.Z https://github.com/tusc/wireguard-kmod/releases/download/v03-13-22/wireguard-kmod-03-13-22.tar.Z

tar -C /mnt/data -xvzf wireguard-kmod.tar.Z

cd /mnt/data/wireguard
chmod +x setup_wireguard.sh
./setup_wireguard.sh

I'm not sure why but I had this messages:

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

anyway, I ignored and checked dmesg which returned

[ 3194.976966] wireguard: WireGuard 1.0.20211208 loaded. See www.wireguard.com for information.
[ 3194.976970] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Res

this also return an error

root@Dream-Machine-Special-Edition:/etc/split-vpn# modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.19.152-ui-alpine
peacey commented 2 years ago

Hi @lowrisk75,

The symbolic link errors are just warnings, you can ignore those. That's expected.

Your wireguard module loaded successfully. Have you tried to use it?

You won't be able to use modprobe because you need to use the setup script to load it instead. But as I said, your wireguard loaded successfully so just try to use it.

lowrisk75 commented 2 years ago

Hi @peacey Perfect. it's working.

unrelated question but are this paths right?

/etc/split-vpn/wireguard/mullvad for wg0.conf | vpn.conf | run-vpn.sh* /mnt/data/wireguard/ for setup_wireguard.sh

and for surviving a reboot I just need to

curl -Lo /etc/systemd/system/setup-wireguard.service https://raw.githubusercontent.com/tusc/wireguard-kmod/main/src/boot/setup-wireguard.service
 systemctl daemon-reload
 systemctl enable setup-wireguard

(with was the step when installing WG kmod) actually I must be wrong because with the splitVPN I created /etc/split-vpn/wireguard/mullvad/run-vpn.sh should I run systemctl enable run-vpn.sh ? EDIT, nope : run-vpn.sh.service does not exist.

#!/bin/sh

# Set up the wireguard kernel module and tools
#/mnt/data/split-vpn/vpn/setup-split-vpn.sh ##seems to be required on my UDMPRO setup but probably because I #misread something
/mnt/data/wireguard/setup_wireguard.sh

# Load configuration and run wireguard
cd /etc/split-vpn/wireguard/mullvad
. ./vpn.conf
 /etc/split-vpn/vpn/updown.sh ${DEV} pre-up >pre-up.log 2>&1
wg-quick up ./${DEV}.conf >wireguard.log 2>&1
cat wireguard.log

Also this is definitely safe to update the UDM PRO firmware? I'm always super stress about it (with the UDM PRO)