HOME

LB NTH / LOAD BALANCING NTH SCRIPT GENERATOR FOR MIKROTIK ROUTEROS

Script Generator Result
################################################
# LOAD BALANCING NTH (LB NTH) SCRIPT GENERATOR
# Date/Time:
# Created By: BuanaNETPBun.Github.io - fb.me/buananet.pbun
# Load Balancing Metode -> NTH
################################################

/ip firewall address-list
add address=192.168.0.0/16 list=LOCAL-IP comment="LB By BNT"
add address=172.16.0.0/12 list=LOCAL-IP comment="LB By BNT"
add address=10.0.0.0/8 list=LOCAL-IP comment="LB By BNT"
/ip firewall nat
add chain=srcnat out-interface="" action=masquerade comment="LB By BNT"
add chain=srcnat out-interface="" action=masquerade comment="LB By BNT"
/ip route
add check-gateway=ping distance=1 gateway="" routing-mark="" comment="LB By BNT"
add check-gateway=ping distance=1 gateway="" routing-mark="" comment="LB By BNT"
add check-gateway=ping distance=1 gateway="" comment="LB By BNT"
add check-gateway=ping distance=2 gateway="" comment="LB By BNT"
/ip firewall mangle
add action=mark-connection chain=prerouting in-interface="" new-connection-mark="" passthrough=yes comment="LB By BNT"
add action=mark-connection chain=prerouting in-interface="" new-connection-mark="" passthrough=yes comment="LB By BNT"
add action=mark-routing chain=output connection-mark="" new-routing-mark="" passthrough=yes comment="LB By BNT"
add action=mark-routing chain=output connection-mark="" new-routing-mark="" passthrough=yes comment="LB By BNT"
add action=mark-connection chain=prerouting dst-address-list=!LOCAL-IP new-connection-mark="" passthrough=yes connection-state=new nth=2,1 src-address-list=LOCAL-IP comment="LB By BNT"
add action=mark-connection chain=prerouting dst-address-list=!LOCAL-IP new-connection-mark="" passthrough=yes connection-state=new nth=2,2 src-address-list=LOCAL-IP comment="LB By BNT"
add action=mark-routing chain=prerouting connection-mark="" dst-address-list=!LOCAL-IP new-routing-mark="" passthrough=no src-address-list=LOCAL-IP comment="LB By BNT"
add action=mark-routing chain=prerouting connection-mark="" dst-address-list=!LOCAL-IP new-routing-mark="" passthrough=no src-address-list=LOCAL-IP comment="LB By BNT"

Copy-Paste to Terminal, make sure Mangle Script on the Top position!