Wireguard split tunneling

I would like to route my Wireguard VPN traffic trough the SSID UniFi-VPN and route the traffic from SSID UniFi-WIFI directly over the WAN interface without the Wireguard VPN but I don't get it to work.

Modem (China Telecom > Edgerouter x (OpenWRT > Unifi nanoHD (On port 2 from my Edgerouter X)


if I connect to the different SSID's then my ip adres changes to an ip from that subnet. My VPN is working now on both subnets.

Now all my internet traffic from both SSID's are going trough the VPN. How do I get the traffic from SSID UniFi-WIFI to bypass the vpn? I tried it with the option in wireguard with Route Allowed IP's and then specify the subnet or the ip adres from my laptop but then all internet traffic seems to stop working. Also I tried Luci Policy Routing and specify to route the traffic from the subnet trough the WAN interface and the traffic from trough the Wireguard interface.But then also the internet traffic seems to stop working. What do I do wrong? Thanks for any help!

Firewall zones


Route Allowed IPs

Switch vlans

Wireguard Interface - firewall

1 Like

And create a policy for the source subnet that you want to route to the VPN.

1 Like

So I installed Luci policy based routing and make a rule? have you looked at the images in my post?

1 Like

You can omit the local/remote ports and remote addresses.
The WAN policy is redundant assuming that you have disabled gateway redirection for WG.

It seems to be working now when I omit the local/remote ports and remote addresses.

What do you mean exactly with the WAN policy and disabling gateway redirection for WG?

Thanks a lot!

1 Like

Assuming that you have disabled the WG peer option "Route Allowed IPs".
Hosts from the subnet should be routed to the VPN.
Everything else goes to WAN by default, so the second policy is not necessary.

Its still on, but it seems the be working fine now, afraid to turn it off and make it stop working.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.