I have a scenario where i am a bit stuck. Below is a brief info of what i am working on.
We have 2 ISP. (ISP1 and ISP2).
We have 2 separate Live IP pools from both ISPs (pool1 and pool2).
Local Clients use 192.168.10.0/24 , few clients are provided with live IP (from ISP1 and ISP2 at random).
Web-proxy is needed to be configured at Mikrotik for user web logs as per company policy.
Logs are needed only for 192.168.10.0/24 , so Live IPs are not required to go through Proxy.
I have configured Proxy to only accept 192.168.10.0/24 through a dst-nat rule in IP->Firewall->NAT.
I have configured separate Routing Mark rules in IP->Firewall->Mangle. Below are the routing rules.
I have defined routes for each routing mark to fit my need. Live IPs from ISP1 are set to route to the Gateway provided by ISP1 and Live IPs from ISP2 are set to route to the gateway provided by ISP2.
But what i am facing is that the default route is being used by everything. The routes that i created by specifying routing marks are not working.
I would like to know, how will i be able to route only 192.168.10.0/24 to proxy and not the Live IP’s from both the ISPs and also that Live IPs from each ISP should be routed to their respective gateways.
Thanks for your reply, below are the details that you asked, i have removed replaced IP’s with “XXX”
[admin@firewall.mywall] > ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=192.168.10.253/24 network=192.168.10.0 interface=LAN actual-interface=LAN
1 address=XXX.XXX.XXX.XXX/30 interface=TW actual-interface=TW (Point to Point from ISP1 - TW /30)
2 address=XXX.XXX.XXX.XXX/29 interface=LAN actual-interface=LAN (Public Pool Gateway ISP1 - TW /29)
3 address=192.168.1.10/24 network=192.168.1.0 interface=DSL actual-interface=DSL
4 address=XXX.XXX.XXX.XXX/30 interface=WCALL actual-interface=WCALL (Point to Point from ISP2 - WCALL)
5 address=XXX.XXX.XXX.XXX/28 interface=LAN actual-interface=LAN (Public Pool Gateway ISP2 - WCALL /28)
[admin@firewall.mywall.com] > interface print detail
Flags: D - dynamic, X - disabled, R - running, S - slave
0 R name="LAN" type="ether" mtu=1500 max-l2mtu=4096
1 R name="WCALL" type="ether" mtu=1500 max-l2mtu=4096
2 R name="TW" type="ether" mtu=1500
3 R name="DSL" type="ether" mtu=1500
[admin@firewall.mywall.com] > ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
0 A S dst-address=0.0.0.0/0 gateway=<GW of ISP2> gateway-status=XXX.XXX.XXX.XXX reachable WCALL distance=1 scope=30 target-scope=10
routing-mark=first_floor_route
1 A S dst-address=0.0.0.0/0 gateway=<GW of ISP2> gateway-status=XXX.XXX.XXX.XXX reachable WCALL distance=1 scope=30 target-scope=10
routing-mark=Mezzanine_Route
2 A S dst-address=0.0.0.0/0 gateway=<GW of ISP1> gateway-status=XXX.XXX.XXX.XXX reachable TW distance=1 scope=30 target-scope=10
routing-mark=SOC_Route
3 A S dst-address=0.0.0.0/0 gateway=<GW of ISP2> gateway-status=XXX.XXX.XXX.XXX reachable WCALL distance=1 scope=30 target-scope=10
routing-mark=Third_Floor_Route
4 A S dst-address=0.0.0.0/0 gateway=<GW of ISP2> gateway-status=XXX.XXX.XXX.XXX reachable WCALL distance=1 scope=30 target-scope=10
routing-mark=WCALL_LIVE_POOL
5 A S dst-address=0.0.0.0/0 gateway=<GW of ISP1> gateway-status=XXX.XXX.XXX.XXX reachable TW check-gateway=ping distance=1 scope=30
target-scope=10