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