I've done this to a set of static IP addresses to access the internet directly, bypassing my VPN, but in this case it should also work to only include the wireless network.
Based on @Lombus post, a wireless interface named DIRECT which is functioning.
So it's a matter of installing the
ip package, and editing
/etc/iproute2/rt_tables, then stopping, reloading and starting services again.
Install ip package:
opkg install ip
Define a new routing table named exvpn in
/etc/iproute2/rt_tables, by inserting
rt_tables file may look different but only insert the above.
# reserved values
Add routes and rules in
x.x.x.x with your gateway IP address
direct with your named wireless interface
x.x.x with your wireless interface subnet
# Stage the alternative default route in table exvpn
option interface 'wan'
option target '0.0.0.0'
option netmask '0.0.0.0'
option gateway 'x.x.x.x'
option table 'exvpn'
# Direct the wireless interface 'direct' to table exvpn
option in 'direct'
option src 'x.x.x.0/24'
option lookup 'exvpn'
stop VPN, reload network, start VPN
I tried this briefly using my
guest interface and it seemed to work as intended.