Skip to content

How to visit WireGuard client LAN side from Server

Topology Using GL-AX1800 as server and GL-SFT1200 as client

topology

  1. Change WireGuard client LAN IP to 192.168.10.1 avoid IP confliction with Server.

  2. SSH into your the WireGuard Server (GL-AX1800) find and modify the file.

    cat /etc/config/wireguard_server
    

    wireguardconfig

    Add the subnet route 192.168.10.0/24 into the configuration file

    vi /etc/config/wireguard_server
    

    viconfig

  3. Restart the server and double confirm the subnet is added in the allowed ips line.

    /etc/init.d/wireguard_server restart
    

    wg
    

    serverrestart

  4. Add a static route into the server route table.

    ip route add 192.168.10.0/24 dev wg0
    

    route -n
    

    addroute

  5. 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