Hi,
today I tried following - to use our both ISPs, as we finally are connected to both of them:
http://www.xidys.com/xidysnet-en.jpg
My task is - I want J town local 10.0.0.x traffic, to go via ISP1, and all nodes 10.0.5.x, to go via ISP2. I did following:
Mangle:
---------
2 chain=prerouting src-address=10.0.0.0/24 action=mark-routing
new-routing-mark=K_local2.4 passthrough=yes
3 chain=prerouting src-address=10.0.5.0/24 action=mark-routing
new-routing-mark=AP_10.0.5.x passthrough=yes
Routing:
----------
two gateways used:
0.0.0.0/0 gw xxxx routing-mark AP_10.0.5.x
0.0.0.0/0 gw yyyy routing-mark K_local2.4
NAT:
------
0 chain=srcnat out-interface=xxxx action=masquerade
1 chain=srcnat out-interface=yyyy action=masquerade
2 chain=srcnat src-address=10.0.0.111 dst-address=10.0.5.2 action=masquerade
3 chain=srcnat src-address=10.0.0.111 dst-address=10.0.5.3 action=masquerade
BUT - by doing so, my nat rules 2 and 3 stopped to work - I used them to get from local 10.0.0.xx PC via Winbox to remote 10.0.5.2 and 10.0.5.3 nodes via Winbox ...
The question is - I did mangling plus gw definition according to docs, but I can't see any NAT with docs example. Do I need to still masquarade the traffic on outgoing interfaces, or simply I don't need to if I use mangle?
Well, but mangle is about marking for routing, right? I imo still need to NAT to address of respective outgoing interfaces, no? But why my other NAT rules stopped to work? Maybe such traffic is catched by some previous rules? Dunno, confused
Thanks,
Petr