Router in client mode with wireguard client on

Hello. i’m trying to configure * GL.iNet GL-AR300M in client mode and wireguard client ON to share the lan where it is installed with remote wireguard users clients (the wireguard server is a remote vps).

But when i put it in access point mode, the wireguard client interfaces disappear.

How to reach this approach? only using LUCI control panel?

Hello,

You're encountering a common issue with GL.iNet routers (and OpenWRT in general). When you switch to Access Point (AP) mode, the router's primary focus shifts to bridging the wireless interface to the LAN. This often reconfigures the network interfaces, and WireGuard, which relies on specific interface configurations, gets disrupted. It's not that the WireGuard client disappears, but rather the interface WireGuard uses to connect to your VPS is no longer correctly associated.

Here's the breakdown of the problem and the solution using the LuCI interface:

Understanding the Issue

Client Mode: In client mode, the GL-AR300M connects to an existing Wi-Fi network (like your home Wi-Fi) and acts as a client. Your WireGuard client runs on this connection.
Access Point Mode: In AP mode, the GL-AR300M creates a Wi-Fi network. It needs a connection to the internet to share. The problem is that the previously configured Wi-Fi client connection is usually dropped, breaking the WireGuard tunnel which was dependent on it.
Solution: Relayd (Recommended)

The most robust way to achieve what you want is using a feature called relayd. Relayd allows you to create a transparent bridge between your existing network (which you'll connect to in client mode) and the Wi-Fi network the GL-AR300M creates in AP mode. This way, devices connected to the GL-AR300M's Wi-Fi will be on the same network as your existing network, and the WireGuard connection will remain active.

Here's how to configure it in LuCI:

Client Mode First: Configure the GL-AR300M in client mode and connect it to your existing Wi-Fi network. Make sure it gets an IP address and has internet access. Test your WireGuard connection to your VPS while still in client mode to ensure it's working.

Install Relayd: If not already installed, go to System -> Software in LuCI and install the relayd package.

Configure Relayd:

Go to Network -> Interfaces.
Add a new interface. Give it a name (e.g., relay).
Set the Protocol to Relay.
In the Relay Options tab:
Under Bridge interface, select your LAN interface (usually br-lan).
Under Master interface, select the Wi-Fi interface that's connected to your existing network (it will have a name like wlan0 or similar).
Configure the Wireless Interface (AP Mode):

Go to Network -> Wireless.
Edit the existing Wi-Fi interface (or add a new one if you don't have one set up for AP mode).
Set the Mode to Access Point.
Configure the SSID (Wi-Fi name), password, etc. as desired.
In the Interface section, select the newly created relay interface. Do not select br-lan directly.
Firewall:

Go to Network -> Firewall.
Ensure that the relayd interface is in the lan zone or a zone that allows forwarding. This will allow traffic to flow between the Wi-Fi clients and your WireGuard tunnel.
Restart Network: Go to System -> Reboot and reboot the router.

Explanation:

Relayd creates a bridge. It takes traffic from your existing Wi-Fi connection (master interface) and forwards it to the LAN interface, which is also connected to your Wi-Fi AP. This makes your Wi-Fi AP a seamless extension of your existing network. Obamacare com
Because the GL-AR300M maintains its connection to your existing Wi-Fi, the WireGuard connection remains active. Devices connected to the GL-AR300M's Wi-Fi will be able to use the WireGuard tunnel.

Best Regards

3 Likes