GL.iNet GL-AR300M16 Split Tunnel?

Hi Guys,

Quick question about this router…

I’ve got it setup working fine with my OpenVPN file but I have local shared folders on a NAS that i cannot access while going through the device using the VPN. I thought maybe turning off the DHCP server on the GL.iNet device so that the connected device would get a local IP from my main router might work but I don’t think its possible. I have also tried different switches on the GL.iNet device like bridge mode but it just broke the connection.

I’ve done some research and it seems I need to use VPN Split Tunneling? I have no idea how I can do that with this setup though… any ideas?

My setup:

[Main Router - WAN] ----- [GL.iNET] ----- [Device]
[Main Router - WAN] ----- [Local NAS]

Question is… how can I get the device to access the WAN through the VPN but still allow it to connect to the local NAS too?

Thanks!

Reading on the forum. There seems to be alot of problems associate with VPN and other things. Be it captive portal, DNS leaks, wrong DNS servers, passthrough, killswitch and generally switching between VPN/passthrough.

As most GL router uses Atheros WiFi chipset. You can create multiple wifi APs. One for passthrough (captive portal/NAS) and the other for VPN. I have set my AR150 up this way with scripts which has 3 APs. One passthrough, one wireguard vpn and one openvpn. It takes me under 3 mins to login to any hotels to have the system up. No messing around with switch, turning off VPN, changing DNS setting.

You’ll need to look into policy based routing which solves all of the above problem.

I’d be curious to see at least the basics to this; care to share how you’d gone about that?

To create multiply wifi AP. I use this guide, substitute guest for vpn

https://openwrt.org/docs/guide-user/network/wifi/guestwifi/configuration

For policy based routing, I use this example

The above is the simple basis which you have to string it altogether.

I have the AR150 as self service, connect to hotel and forget. It will monitor the connections of all vpns and should one fail, it will move down a list of predefined VPN. It also has ‘wifi manager’ so it auto connects on startup to known saved hotel AP. All of this automation is done without ever writing to flash memory once it’s setup.

On my big brother home router tplink C7, I have WG/openvpn vpn clients and also WG/openvpn vpn servers running which I can dial home.

Could you ssh to the router, and issue cat /etc/config/firewall. Let me check the output.

Thanks Sammo & Guys but I was hoping to be able to setup some sort of IP forwarding so that I don’t have to switch to different networks each time.

Kyson-lok, I’ll get you the output asap

The device I mention is an Amazon Fire 4K box networked into GL.iNet box. I want Kodi to see local shares and be able to use the VPN for WAN.

I think you will need to add static routes on the main router how to route from NAS to the Kodi device and vice versa
Your Gl inet is probably doing NATTing as you have VPN. Your Kodi and NAS is not on the same subnet.

https://wiki.openwrt.org/doc/howto/clientmode
read the section on Routed Client Mode