Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /ip firewall address-list
- add address=0.0.0.0/8 list=ipLokal
- add address=10.0.0.0/8 list=ipLokal
- add address=127.0.0.0/8 list=ipLokal
- add address=169.254.0.0/16 list=ipLokal
- add address=172.16.0.0/12 list=ipLokal
- add address=192.168.0.0/16 list=ipLokal
- /ip firewall nat
- add chain=srcnat out-interface="ether1" action=masquerade
- add chain=srcnat out-interface="ether2" action=masquerade
- /ip route
- add check-gateway=ping distance=1 gateway=" 192.168.1.1" routing-mark="to-ether1"
- add check-gateway=ping distance=1 gateway="192.168.2.1" routing-mark="to-ether2"
- add check-gateway=ping distance=1 gateway="192.168.1.1"
- add check-gateway=ping distance=2 gateway="192.168.2.1"
- /ip firewall mangle
- add action=mark-connection chain=input in-interface="ether1" new-connection-mark="con-ether1" passthrough=yes
- add action=mark-connection chain=input in-interface="ether2" new-connection-mark="con-ether2" passthrough=yes
- add action=mark-routing chain=output connection-mark="con-ether1" new-routing-mark="to-ether1" passthrough=yes
- add action=mark-routing chain=output connection-mark="con-ether2" new-routing-mark="to-ether2" passthrough=yes
- add action=mark-connection chain=prerouting dst-address-list=!ipLokal dst-address-type=!local new-connection-mark="con-ether1" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0 src-address-list=ipLokal
- add action=mark-connection chain=prerouting dst-address-list=!ipLokal dst-address-type=!local new-connection-mark="con-ether2" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1 src-address-list=ipLokal
- add action=mark-routing chain=prerouting connection-mark="con-ether1" dst-address-list=!ipLokal new-routing-mark="to-ether1" passthrough=yes src-address-list=ipLokal
- add action=mark-routing chain=prerouting connection-mark="con-ether2" dst-address-list=!ipLokal new-routing-mark="to-ether2" passthrough=yes src-address-list=ipLokal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement