You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time when any interface that using proto_add_host_dependency function (PPTP, L2TP, 6in4) comes up the system automatically adds route for VPN server. That's nice, but the problem is that the function does not realy alalyze the routing table. It uses first default gateway. This causes serious errors in configurations with a complex routing table or multi-wan configurations. it is necessary to refine this function so that it analyzes the routing table and all routes and also the metrics and adds a route to the real gateway for this host, not only first defalt gateway.
The text was updated successfully, but these errors were encountered:
my "solution" was to add an option to specify the uplink using uci.
downside is that you'll have to change the netifd-proto files.
see the attached example ("uplink network").
if you're interested, we could work out something more sophisticated using netifd.
i'm up for some programming ;-)
Just hit the same issue
default via 192.168.14.1 dev wanmaison1 proto static metric 10
default via 192.168.21.1 dev wancamp1 proto static metric 20
default via 192.168.20.1 dev wancave proto static metric 60
...
1.2.3.4 via 192.168.21.1 dev wancamp1 proto static metric 20
where 1.2.3.4 is the vpn endpoint
The only way to find the correct interfaces is to use ip r get or equivalent netlink call before setting up the vpn
morzexxx:
Every time when any interface that using proto_add_host_dependency function (PPTP, L2TP, 6in4) comes up the system automatically adds route for VPN server. That's nice, but the problem is that the function does not realy alalyze the routing table. It uses first default gateway. This causes serious errors in configurations with a complex routing table or multi-wan configurations. it is necessary to refine this function so that it analyzes the routing table and all routes and also the metrics and adds a route to the real gateway for this host, not only first defalt gateway.
The text was updated successfully, but these errors were encountered: