I could not find a relative thread although it must have been asked before. Anyway. I would like to mark traffic coming from a wan interface and reroute it back using the same one. I am using masqurade for the wan interfaces. will this work?
/ip firewall mangle
add action=mark-connection chain=input comment=“” disabled=no in-interface=
ether5 new-connection-mark=“New Incoming Eth5” passthrough=yes
add action=mark-connection chain=input comment=“” disabled=no in-interface=
ether6 new-connection-mark=“New Incoming Eth6” passthrough=yes
add action=mark-connection chain=input comment=“” disabled=no in-interface=
ether7 new-connection-mark=“New Incoming Eth7” passthrough=yes
add action=mark-routing chain=output comment=“” connection-mark=
“New Incoming Eth5” disabled=no new-routing-mark=“New Outgoing Eth5”
passthrough=no
add action=mark-routing chain=output comment=“” connection-mark=
“New Incoming Eth6” disabled=no new-routing-mark=“New Outgoing Eth6”
passthrough=no
add action=mark-routing chain=output comment=“” connection-mark=
“New Incoming Eth7” disabled=no new-routing-mark=“New Outgoing Eth7”
passthrough=no
/ip route
add check-gateway=ping comment=“” disabled=no distance=1 dst-address=
0.0.0.0/0 gateway=192.168.4.254 routing-mark=“New Outgoing Eth5” scope=30
target-scope=10
add check-gateway=ping comment=“” disabled=no distance=1 dst-address=
0.0.0.0/0 gateway=192.168.5.254 routing-mark=“New Outgoing Eth6” scope=30
target-scope=10
add check-gateway=ping comment=“” disabled=no distance=1 dst-address=
0.0.0.0/0 gateway=192.168.6.254 routing-mark=“New Outgoing Eth7” scope=30
target-scope=10
Of course I also have a default route