today I tried out WireGuard-go on my R7800. A few observations:
An earlier fix regarding VPN bypassing on WireGuard that I suggested to @kamoj apparently doesn't work.
(guess we don't have ppl using WG with VPN Bypass.)
Code:if [ -z "$WAN_GWAY" ]; then WAN_GWAY="$(ip route | awk '/via/ && /dev "$WAN_IF"/ && !/default/"'{print $3}')";fi
Here the awk command is in single quotes, so it never expands the variable "$WAN_IF"
This line does work:
Code:if [ -z "$WAN_GWAY" ]; then WAN_GWAY="$(ip route | awk "/via/ && /dev $WAN_IF/ && !/default/"'{print $3}')";fi
Another thing I noticed:
With OpenVPN, I can click the green box (with the white check mark) to stop OpenVPN and then click the red box to start it again.
With WireGuard however, this doesn't reliably work...
(When it doesn't work, then starting via the green "start Wireguard Client with this" does work. But for stopping, I need to use etc/init.d/wg-client stop.)
And last thing: the killswitch for WireGuard also doesn't work.
(would't it be simpler just call the same kill-switch script as for OpenVPN? (including to exclude bypassed devices from killswitch)Code:root@R7800:~$ /tmp/wireguard/firewall-start-wireguard_killswitch.sh iptables v1.8.4 (legacy): mark: bad integer value for option "--mark", or out of range. Try `iptables -h' or 'iptables --help' for more information.
also stopping wireguard doesn't properly cleanup its routes.
stopping it shows:
and then this route still remains in my routing tables:Code:2020-06-09 23:57:55 [OpenVPN] WireGuard Client 32144: 4345.91:Information: Stop: Delete wireguard routing Error: either "to" is duplicate, or "13.95.xxx.xxx" is a garbage.
13.95.xxx.xxx via 94.213.xxx.xxx dev brwan
Perhaps tomorrow I'll take a look if I can improve the WG init-script
EDIT: already had a quick peek -> the issue is that I have configured additional static routes via Advanced Setup -> Static Routes.
If I remove my static routes, then the init-script does successfully cleanup on shutdown.
I normally run OpenVPN, but after seeing your post I installed WireGuard to check it out on my R9000. I see much the same...
- WireGuard bypass does not work
-The Green/Red (Start/Stop) checkbox acts buggy. For it me hasn't failed to stop WireGuard. However, checking the box to start Wireguard sometimes refreshes the section but doesn't appear to initiate a start (box doesn't turn green). I've also seen an instance where the log said WireGuard started successfully but the Shield symbol still showed Red. Restarting corrected that.
Thanks,
BL