Configuring 2 LAN interfaces with 2 different gateways

Hi all. I am using a Xiaomi AX3200 with OpenWRT 23.05. I have 4 interfaces. LAN1, LAN2, WAN and WG0. LAN (192.168.10.1/24) goes through the WG0 interface which is a Wireguard VPN tunnel. LAN3 (192.168.12.1/24) I tried to configure it to go through the WAN directly, but it doesn't work. How can I configure a different gateway for each interface?

If I allow in the firewall the LAN2 traffic to the WG0 interface, it works, so the default gateway seems to be the WG0 interface.

Policy Based Routing is the magic word:
See:
https://openwrt.org/docs/guide-user/network/routing/pbr

2 Likes

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