
/ ip firewall mangle
add chain=prerouting in-interface=LAN src-address-list=cnc1 \
action=mark-connection new-connection-mark=wan1 passthrough=yes \
comment="cnc1 oldconn" disabled=no
add chain=prerouting in-interface=LAN src-address-list=cnc1 \
action=mark-routing new-routing-mark=cnc1 passthrough=yes comment="cnc1 \
oldmark" disabled=no
add chain=prerouting in-interface=LAN src-address-list=cnc2 \
action=mark-connection new-connection-mark=wan2 passthrough=yes \
comment="cnc2 oldconn" disabled=no
add chain=prerouting in-interface=LAN src-address-list=cnc2 \
action=mark-routing new-routing-mark=cnc2 passthrough=yes comment="cnc2 \
oldmark" disabled=no
add chain=prerouting in-interface=LAN src-address-list=tel1 \
action=mark-connection new-connection-mark=wan3 passthrough=yes \
comment="tel1 oldconn" disabled=no
add chain=prerouting in-interface=LAN src-address-list=tel1 \
action=mark-routing new-routing-mark=tel1 passthrough=yes comment="tel1 \
oldmark" disabled=no
add chain=prerouting in-interface=LAN src-address-list=tel2 \
action=mark-connection new-connection-mark=wan4 passthrough=yes \
comment="tel2 oldconn" disabled=no
add chain=prerouting in-interface=LAN src-address-list=tel2 \
action=mark-routing new-routing-mark=tel2 passthrough=yes comment="tel2 \
oldmark" disabled=no
add chain=prerouting in-interface=LAN src-address=192.168.0.0/23 \
connection-state=new nth=1,1,0 dst-address-list=cnc action=mark-connection \
new-connection-mark=wan1 passthrough=yes comment="cnc1 conn" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan1 \
action=add-src-to-address-list address-list=cnc1 address-list-timeout=1d \
comment="cnc1 src" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan1 action=mark-routing \
new-routing-mark=cnc1 passthrough=no comment="cnc1 mark" disabled=no
add chain=prerouting in-interface=LAN src-address=192.168.0.0/23 \
connection-state=new nth=1,1,1 dst-address-list=cnc action=mark-connection \
new-connection-mark=wan2 passthrough=yes comment="cnc2 conn" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan2 \
action=add-src-to-address-list address-list=cnc2 address-list-timeout=1d \
comment="cnc2 src" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan2 action=mark-routing \
new-routing-mark=cnc2 passthrough=no comment="cnc2 mark" disabled=no
add chain=prerouting in-interface=LAN src-address=192.168.0.0/23 \
connection-state=new nth=1,1,0 dst-address-list=!cnc \
action=mark-connection new-connection-mark=wan3 passthrough=yes \
comment="tel1 conn" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan3 \
action=add-src-to-address-list address-list=tel1 address-list-timeout=1d \
comment="tel1 src" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan3 action=mark-routing \
new-routing-mark=tel1 passthrough=no comment="tel1 mark" disabled=no
add chain=prerouting in-interface=LAN src-address=192.168.0.0/23 \
connection-state=new nth=1,1,1 dst-address-list=!cnc \
action=mark-connection new-connection-mark=wan4 passthrough=yes \
comment="tel2 conn" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan4 \
action=add-src-to-address-list address-list=tel2 address-list-timeout=1d \
comment="tel2 src" disabled=no
add chain=prerouting in-interface=LAN connection-mark=wan4 action=mark-routing \
new-routing-mark=tel2 passthrough=no comment="tel2 mark" disabled=no