Advertisement
punces

LB-2-WAN

Mar 1st, 2017
1,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. #ip modem1 = 192.168.1.1
  2. #ip modem2 = 192.168.100.1
  3. #asumsi modem1 dan modem2 = kecepatan sama
  4.  
  5. /ip firewall address-list
  6. add address=10.0.0.0/8 list=private-lokal
  7. add address=172.16.0.0/12 list=private-lokal
  8. add address=192.168.0.0/16 list=private-lokal
  9.  
  10. /ip firewall nat
  11. add action=masquerade chain=srcnat comment=masquerade out-interface=modem1
  12. add action=masquerade chain=srcnat comment=masquerade out-interface=modem2
  13.  
  14. /ip route
  15. add check-gateway=ping comment=default distance=1 gateway=192.168.1.1
  16. add check-gateway=ping comment=backup distance=2 gateway=192.168.100.1
  17. add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.1.1 routing-mark=exit-1
  18. add check-gateway=ping comment=exit-2 distance=1 gateway=192.168.100.1 routing-mark=exit-2
  19. add check-gateway=ping comment=jalur-1 distance=1 gateway=192.168.1.1 routing-mark=jalur-1
  20. add check-gateway=ping comment=jalur-1 distance=2 gateway=192.168.100.1 routing-mark=jalur-1
  21. add check-gateway=ping comment=jalur-2 distance=1 gateway=192.168.100.1 routing-mark=jalur-2
  22. add check-gateway=ping comment=jalur-2 distance=2 gateway=192.168.1.1 routing-mark=jalur-2
  23.  
  24.  
  25. /ip firewall mangle
  26. add action=mark-connection chain=input comment=exit-1 in-interface=modem1 new-connection-mark=exit-1 passthrough=yes
  27. add action=mark-connection chain=input comment=exit-2 in-interface=modem2 new-connection-mark=exit-2 passthrough=yes
  28. add action=mark-routing chain=output comment=exit-1 connection-mark=exit-1 new-routing-mark=exit-1 passthrough=no
  29. add action=mark-routing chain=output comment=exit-2 connection-mark=exit-2 new-routing-mark=exit-2 passthrough=no
  30. 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
  31. 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