So my default route is VPN connection (PPTP in my case)
But i also need to use ADSL route (pppoe) for accessing some ip ranges with it. For example:
0.0.0.0/0 - VPN interface
but
192.168.24.0/24 and 10.10.10.0/24 - ADSL interface.
Setting routes in ip - routes does not work, of course.
And also i need packets that hit ADSL interface directly works. In my case, as i can understand, if i ping my ADSL ip reply packets goes thru VPN interface.
The main problem that i can’t use mangle here and i does not see any other way how to do that.
Thanks!
UPD: now i can use static routes for ADSL - i just added second masquerade rule. But i still have problem with incoming traffic.
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
So, try the reverse.
I mean add a new 0.0.0.0/0 route with DG of PPPoE and use a lower metric than PPTP route. then mark route for PPTP packets and . . . (like the last post)
Yes Metric or distance in Mirktoik
BTW, Routing mark is enough.
I have done this setting for my network. I have two 0.0.0.0/0 route. one DG is PPPoE and the other is PPTP. done with routing mark.
Strange… ADSL and PPTP - metric=1. PPTP routing mark - “uplink” (that’s in ip → routes)
in mangle - mark all routes with in-interface=pptp-uplink as “uplink” (prerouting) (ip - firewall - mangle)
In that case, default gw = ADSL.
P.S. i do not use “use as default gw” in PPTP/PPPOE client and write 0.0.0.0/0 routes manually, that’s why i can’t use metric=0
I do not have other 0.0.0.0/0 routes, but i have few routes with 0 metric.
Yes, i need PPTP as default route but i need access to ADSL ip from external net.
Sorry if i described something wrong because my english is not really good.
BTW, with config in prev post i’m not able to ping PPTP ip
So,
I think there is another way.
use mangle for mark routing for your LAN users to use PPTP as their DG.
the result:
you have two DG. one PPTP and the other PPoE.
when your LAN users try to reach Internet, they go through PPTP.
when any packet comes in to your router which not refer to your LAN users and don’t come from PPTP, use PPPoE route.
Ii think it should works good for you. If I have any mistake in this, just tell me