synology-wireguard: Not working with DSM 7.1.1-42962 Update 1
Hi, I have a DS 220j and with the recent upgrade to 7.1.1-42962 Update 1, WireGuard stopped working. I rebuilt the package and installed it again, but without success.
The intended (and previously working) use case is a VPN client inside a home network (behind NAT) that connects to a server running WireGuard. When I tcpdump on the server, I can see packets coming from the client and responses going out, but according to the WireGuard logs, the handshake never completes. It’s strange that the port number of the client’s endpoint entry is reported as 0 (which is not a valid UDP port). When I tcpdump on the client, I can see ICMP messages that the packets to the invalid UDP port 0 are dropped (these are the server responses, apparently) and the RX counter of wg show stays at zero.
Moreover, once setup the wg0 interface cannot be brought down, as ip link del dev wg0 segfaults. Then the entire system slowly becomes unresponsive and a forced shutdown is the only option.
Has anyone experienced a similar issue? Or can someone give some pointers on where to dig further?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 22
We used a workflow for Github actions: https://github.com/vegardit/synology-wireguard/blob/master/.github/workflows/build.yml Images can be found here: https://github.com/vegardit/synology-wireguard/releases
@AlexeyGG, I couldn’t find a solution to this issue, but I managed to find a workaround by using the userspace version of WireGuard
Here are the steps to follow:
wireguard-gobinary to/var/packages/WireGuard/target/wireguard(same folder withwg-quickfile)tunmodule is loaded by runninglsmod | grep tun. If it’s not loaded, you can load it usinginsmod tun.This workaround is a bit clumsy, but I can try to publish a fork in the next couple of days to simplify the process.
Have you solved your problem yet? My version is DS920+ with DSM 7.1.1-42962 Update 2. When I run the “wg-quick up wg0”, the system also crashes. here are the error reports root@NAS0:~# sudo wg-quick up wg0 【#】 ip link add wg0 type wireguard 【#】 wg setconf wg0 /dev/fd/63 /usr/local/bin/wg-quick: line 30: 26382 Segmentation fault “$@”
Hello, I have DS 220j with upgrade
DSM 7.1-42661 Update 4Compiled manually with params
docker run --rm --privileged --env PACKAGE_ARCH=rtd1296 --env DSM_VER=7.0 -v $(pwd)/artifacts:/result_spk synobuildInstalled as mentioned in the guide, everything works fine for me.