Greetings.
Hi all.
I have two networks 172.21.10.0/24 and 172.21.1.0/24 and mark local traffic with this rules
add chain=prerouting in-interface=LAN src-address-list=Local
dst-address-list=Local action=mark-connection
new-connection-mark=mark_local_traff passthrough=yes
comment=“Local_Traffic” disabled=no
add chain=prerouting connection-mark=mark_local_traff action=mark-packet
new-packet-mark=local_traff passthrough=yes comment=“” disabled=no
And network 172.21.10.0/24 is named ISP-1 and 172.21.1.0/24 is named ISP-2
I want network ISP-1 to use isp1 connection and ISP-2 to use isp2 connection.Here what i do is..
add chain=prerouting in-interface=LAN src-address-list=Local
dst-address-list=!Local action=mark-connection
new-connection-mark=mark_conn_isp1 passthrough=yes comment=“Internet”
disabled=no
add chain=prerouting connection-mark=mark_conn_isp1 action=mark-packet
new-packet-mark=isp1_pack passthrough=yes comment=“” disabled=no
add chain=prerouting in-interface=LAN connection-mark=mark_conn_isp1
src-address-list=ISP-1 action=mark-routing new-routing-mark=isp1
passthrough=no comment=“ISP-1_RoUte” disabled=no
add chain=prerouting in-interface=LAN connection-mark=mark_conn_isp1
src-address-list=ISP-2 action=mark-routing new-routing-mark=isp2
passthrough=no comment=“ISP-2_RoUte” disabled=no
N A T
add chain=srcnat out-interface=Publick2.165 connection-mark=mark_conn_isp1
src-address-list=ISP-2 action=src-nat to-addresses=...165
to-ports=0-65535 comment=“ISP-1” disabled=no
add chain=srcnat out-interface=Publick122.250 connection-mark=mark_conn_isp1
src-address-list=ISP-1 action=src-nat to-addresses=...250
to-ports=0-65535 comment=“ISP-2” disabled=no
Routes
add dst-address=0.0.0.0/0 gateway=...254 distance=1 scope=255
target-scope=10 routing-mark=isp2 comment=“ISP-1” disabled=no
add dst-address=0.0.0.0/0 gateway=...254 distance=1 scope=255
target-scope=10 routing-mark=isp1 comment=“ISP-2” disabled=no
add dst-address=0.0.0.0/0 gateway=..*.254 distance=0 scope=255
target-scope=10 comment=“” disabled=no
And the problem is that all traffic from two networks goes trough one isp but 172.21.1.0/24 network has isp2 source address and 172.21.10.0/24 has isp1 source address
Sorry for my bad English!
Thanks for any suggestion.