I need a hand with my Mikrotiks. Thank you in advance.
I have two RB2011UiAS(A, B) in the same network(ISP’s network).
Router A
ether1(WAN): 10.33.126.100, gw 10.33.126.1
Local network: 10.1.0.0/24
Router B
ether1(WAN): 10.33.126.101, gw 10.33.126.1
Local network: 10.3.0.0/24
Significant machines in the local network are connected to ether2(10.3.0.11), ether3(10.3.0.12), ether4(10.3.0.13), ether5(10.3.0.14)
Between A and B I setup GRE tunnel (A: 172.16.0.1, B: 172.16.0.2)
Finally, What I need to achieve:
Machines on ether2, ether3, ether4 and 5(or by their IP addresses, MACs) have to go to the Internet via RouterA(172.16.0.1), but at the same time they have to use others routes in the table to reach 10.7.0.0/24(OpenVPN network via default ISP gw) and 10.2.0.0/24(via OpenVPN gw).
You mean I need to change default route for these machines to 172.16.0.1 and other routes make static?
If so I do not see how to make a route in webfig just for specific sources.
place your mangle rule at top, passthrough=no and set source IP to the PC you wish to route to FWAN. From that PC you can then test if this works.
enable log on the rule so you can watch the packet and make sure it goes out to the correct gateway.
I’d use Ip address instead of interface as Gateway.
I’ve not used GRE tunnel before but if it is like PPP, you will have ensure172.16.0.0/30 on Router A is masqurated as well.