I've not seen any review on the WireGuard feature included by ASUS on supported AX routers, so.....
I had the opportunity to try it on a
RT-AX86U running
stock RC3-2 Firmware (v9.0.0.4.386_56898-ge21e952)
The
'Multiple VPN Connection' tab states
16 servers may be defined, but I suspect that total is for the mix of available clients rather than say
16 WireGuard 'client' Peers.
Along with the usual suspects
PPTP,
L2TP and
OpenVPN in the 'VPN type' dropdown, being a long time
HMA subscriber, it was a surprise/bonus to see
HMA included in the firmware alongside
WireGuard!
View attachment 37217
so I was able test L2TP and OpenVPN clients via HMA - and they worked.
WireGuard Peers, I was able to create both a 'server' and 'client' Peer (USA, Los Angeles) and the ASUS GUI duly created interfaces '
wgs1' and '
wgc5' respectively.
I hadn't seen the use of the WireGuard
'Pre-shared Key' option before, and IMHO there were a couple of clunky GUI issues.
The first appears to be that if you wish to set up a split tunnel say with one LAN device using the tunnel, the GUI will not allow you to add another LAN device until you terminate the 'client' Peer connection.
Probably best practice, but a little tedious considering the following dynamic command is presumambly all that is required
ip rule add from xxx.xxx.xxx.xxx table X prio x00;ip route flush cache
The second minor quibble is you can't use the Vendor supplied WireGuard configuration file as-is, you need to manually cut'n'paste the configuration into the individual GUI fields.
Not a big deal, but wouldn't it be nice if you could import the .conf directly into the GUI?
Hang on, I know a script that could do it!
Initially I was only going to add a simple command line option
e.g.
'/jffs/addons/wireguard/wg_manager.sh import wireguard_configuration_file'
but since I was bored, I decided that with a little bit of tweaking, there is no reason why
wireguard_manager
shouldn't be able to run on
stock firmware, pending
@RMerlin's next firmware release based on
v386_56898 or later.
NOTE: This exercise was a proof of concept, as there is no reliable '
/jffs/' auto scripting etc. on
stock firmware
Although there does appear to be the (circa 2019) bug where
memaccess
is apparently invoked/executed?!!!....success
Code:
e = Exit Script [?]
E:Option ==> ?
Router RT-AX86U Firmware (v9.0.0.4.386_56898-ge21e952)
[✔] Entware Architecture arch aarch64-3.10 160
v4.12b5 WireGuard Session Manager (Change Log: https://github.com/MartineauUK/wireguard/commits/dev/wg_manager.sh)
MD5=aedeb7da9c132dff16f69440b14dc46c /jffs/addons/wireguard/wg_manager.sh
[✔] Wireguard Kernel module/User Space Tools included in Firmware (Versions unidentified!)
[✖] DNSmasq is not listening on any WireGuard interfaces 'wg*'
[✔] firewall-start is monitoring WireGuard Firewall rules
[✖] WAN KILL-Switch STATUS N/A (/jffs/addons/wireguard//WireGuardVPN.conf not found?)
[✖] UDP monitor is DISABLED
[ℹ ] Reverse Path Filtering ENABLED
[ℹ ] Speedtest quick link https://fast.com/en/gb/
[✔] Statistics gathering is ENABLED
WireGuard ACTIVE Peer Status: Clients 1, Servers 1
ASUS GUI Peers: Clients 1, Servers 1
I deleted the GUI 'client' Peer and the
import
menu command seems to work...
Code:
e = Exit Script [?]
E:Option ==> import Mullvad_Paris
[✔] Config Mullvad_Paris import as wg11 , wgc5 success
Peers (Auto=P - Policy, Auto=X - External i.e. Cell/Mobile)
Server Auto Subnet Port Annotate
wg21 Y 10.50.1.1/24 51820 # RT-AX86U Server #1
Client Auto IP Endpoint DNS MTU Annotate
wg11 N 10.67.146.14/32 103.231.88.18:51820 193.138.218.74 # Mullvad EU, Paris
and also appeared in the GUI, which I then connected.
View attachment 37218
Code:
e = Exit Script [?]
E:Option ==> 3
interface: wgc5 ***ASUS Internal GUI 'client' Peer***
peer: 3CkVF922uY4xAZBfgRQq3U1mwr24uJlXxvLc3gsHgwA=
latest handshake: 1 minute, 55 seconds ago
transfer: 30.19 KiB received, 111.53 KiB sent ***Session statistics (Duration/data transferred) N/A ***
interface: wg21 Port:51820 10.50.1.1/24 VPN Tunnel Network # RT-AX86U Server #1
interface: wgs1 Port:51821 10.6.0.1/24 VPN Tunnel Network ***ASUS Internal GUI 'server' Peer***
interface: wg11 103.231.88.18:51820 10.67.146.14/32 # Mullvad EU, Paris
peer: D2ltFd7TbpYNq9PejAeGwlaJ2bEFLqOSYywdY9N5xCY=
latest handshake: 54 seconds ago
transfer: 1.78 MiB received, 907.64 KiB sent 0 Days, 00:33:11 from >>>>>>
WireGuard ACTIVE Peer Status: Clients 1, Servers 1
ASUS GUI Peers: Clients 1, Servers 1
In summary, whilst
wireguard_manager
may be compatible with
RC3-2, ASUS again have made strange choices in particular with the Selective Routing table names and RPDB PRIO values
i.e. single digit routing tables
e.g. Selective routing of a single LAN device
Code:
ip rule
0: from all lookup local
100: from 192.168.50.38 lookup 5
32766: from all lookup main
32767: from all lookup default
ip route show table 5
0.0.0.0/1 dev wgc5 scope link
default via 192.168.0.1 dev eth0
127.0.0.0/8 dev lo scope link
128.0.0.0/1 dev wgc5 scope link
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.48
192.168.0.1 dev eth0 proto kernel scope link
192.168.50.0/24 dev br0 proto kernel scope link src 192.168.50.1
193.138.218.74 dev wgc5 scope link
If default is clicked in the GUI
Code:
ip rule
0: from all lookup local
10000: from all lookup 1
32766: from all lookup main
32767: from all lookup default
So there is a potential conflict i.e. ASUS use PRI=100 to PRIO=10000, with
x3mrouting
and
wireguard_manager
using RPDB PRIO 99xx thru' 99xx.