How to visit WireGuard client LAN side from Server¶
Topology Using GL-AX1800 as server and GL-SFT1200 as client¶
-
Change WireGuard client LAN IP to 192.168.10.1 avoid IP confliction with Server.
-
SSH into your the WireGuard Server (GL-AX1800) find and modify the file.
cat /etc/config/wireguard_server
Add the subnet route 192.168.10.0/24 into the configuration file
vi /etc/config/wireguard_server
-
Restart the server and double confirm the subnet is added in the allowed ips line.
/etc/init.d/wireguard_server restart
wg
-
Add a static route into the server route table.
ip route add 192.168.10.0/24 dev wg0
route -n
-
Add a boot lock to avoid the route reset during the reboot.
sed -i "/rm \/var\/run\/glwgserver.lock -rf/a\ip route add 192.168.10.0\/24 dev wg0" /etc/init.d/wireguard_server