Advertisement
hedjo1119

lb nth

Jun 28th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.63 KB | None | 0 0
  1. #Lb NTH 1+1:2
  2. #Jangan ditelan mentah2
  3.  
  4. isp1 = 102.168.10.20/24 route 192.168.10.1
  5. isp2 = 192.168.11.20/24 route 192.168.11.1
  6.  
  7. /ip firewall mangle
  8.  
  9. add chain=prerouting in-interface=ether3-lokal connection-state=new nth=2,1 action=mark-connection new-connection-mark=lb_1 passthrough=yes comment=client disabled=no
  10.  
  11. add chain=prerouting in-interface= ether3-lokal connection-mark=lb_1 action=mark-routing new-routing-mark=route_lb_1 passthrough=no comment=client disabled=no
  12.  
  13. add chain=prerouting in-interface=ether3-lokal connection-state=new nth=2,2 action=mark-connection new-connection-mark=lb_2 passthrough=yes comment=client disabled=no
  14.  
  15. add chain=prerouting in-interface=ether3-lokal connection-mark=lb_2 action=mark-routing new-routing-mark=route_lb_2 passthrough=no comment=client disabled=no
  16.  
  17. /ip firewall nat
  18.  
  19. add chain=srcnat out-interface=ether1-isp1 action=masquerade comment=isp1 disabled=no
  20.  
  21. add chain=srcnat out-interface=ether2-isp2 action=masquerade comment=isp2 disabled=no
  22.  
  23. /ip route
  24.  
  25. add dst-address=0.0.0.0/0 gateway=192.168.10.1 scope=255 target-scope=10 routing-mark=route_lb_1 comment=isp1 disabled=no
  26.  
  27. add dst-address=0.0.0.0/0 gateway=192.168.11.1 scope=255 target-scope=10 routing-mark=route_lb_2 comment=isp2 disabled=no
  28.  
  29. add dst-address=0.0.0.0/0 gateway=192.168.11.1 scope=255 target-scope=10 comment=default routing connection disabled=no
  30.  
  31. add dst-address=0.0.0.0/0 gateway=192.168.11.1 scope=255 target-scope=10 comment=defaultroutingconnection disabled=no
  32.  
  33. add dst-address=0.0.0.0/0 gateway=192.168.11.1 distance=3 scope=255 target-scope=10 comment=defaultroutingconnection disabled=no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement