I have a ZeroTier interface/network on my router.
It has routes for and allows 0.0.0.0/0 - the problem is that I want it to use a certain WireGuard interface for that traffic and not my default route for 0.0.0.0/0 = wan.
I have forbid it to use wan through firewall - but how can I force it to use another gateway than the default = the one with lowest metric ?
I assume the traffic on the other side of the Wireguard you're referring to are specific subnet or subnets (otherwise I'm not sure how you determine different traffic both on the Internet, a.k.a. 0.0.0.0/0), for example: 192.168.xxx.0/24. So, you'd just make a more-specific route for that traffic to use the WG interface:
option target '192.168.xxx.0/24'
option interface 'wg'
That doesn't change routes.
You need to do Policy Based Routing and you have 3 options:
pbr package a set of
rules/routes for each internet connection.
Thanks a lot I solved my problems with PBR and this excellent this documentation
How can I setup multiple OpenVPN client connections and assign/force each VPN to one device on LAN? So that the local device don't use the normal WAN anymore?
This is what I want to achieve:
Each LAN device should have it's own VPN assigned.
If a device is not connected to a VPN it should not have an internet connection.
Those packages were needed:
opkg install luci-app-vpn-policy-routing vpn-policy-routing
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.