Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ip ISP1 = 192.168.0.1
- #ip ISP2 = 192.168.1.1
- /ip firewall address-list
- add address=10.0.0.0/8 list=lokal
- add address=172.16.0.0/12 list=lokal
- add address=192.168.0.0/16 list=lokal
- /ip firewall nat
- add action=masquerade chain=srcnat comment=masquerade out-interface=ISP1
- add action=masquerade chain=srcnat comment=masquerade out-interface=ISP2
- /ip route
- add check-gateway=ping comment=default distance=1 gateway=192.168.0.1
- add check-gateway=ping comment=backup distance=2 gateway=192.168.1.1
- add check-gateway=ping comment=out-1 distance=1 gateway=192.168.0.1 routing-mark=out-1
- add check-gateway=ping comment=out-2 distance=1 gateway=192.168.1.1 routing-mark=out-2
- add check-gateway=ping comment=modem-1 distance=1 gateway=192.168.0.1 routing-mark=modem-1
- add check-gateway=ping comment=modem-1 distance=2 gateway=192.168.1.1 routing-mark=modem-1
- add check-gateway=ping comment=modem-2 distance=1 gateway=192.168.1.1 routing-mark=modem-2
- add check-gateway=ping comment=modem-2 distance=2 gateway=192.168.0.1 routing-mark=modem-2
- /ip firewall mangle
- add action=mark-connection chain=input comment=out-1 in-interface=ISP1 new-connection-mark=out-1 passthrough=yes
- add action=mark-connection chain=input comment=out-2 in-interface=ISP2 new-connection-mark=out-2 passthrough=yes
- add action=mark-routing chain=output comment=out-1 connection-mark=out-1 new-routing-mark=out-1 passthrough=no
- add action=mark-routing chain=output comment=out-2 connection-mark=out-2 new-routing-mark=out-2 passthrough=no
- add action=mark-routing chain=prerouting comment=modem-1 dst-address-list=!lokal dst-address-type=!local new-routing-mark=modem-1 passthrough=no per-connection-classifier=both-addresses-and-ports:2/0
- add action=mark-routing chain=prerouting comment=modem-2 dst-address-list=!lokal dst-address-type=!local new-routing-mark=modem-2 passthrough=no per-connection-classifier=both-addresses-and-ports:2/1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement