LB NTH / LOAD BALANCING NTH SCRIPT GENERATOR FOR MIKROTIK ROUTEROS

Script Generator Result
################################################
# LOAD BALANCING NTH (LB NTH) SCRIPT GENERATOR
# Date/Time:
# By: Ale Ponce - linkme.bio/aleponce
# Load Balancing Method -> NTH
################################################

/ip firewall address-list
add address=192.168.0.0/16 list=LOCAL-IP comment="By: Ale Ponce - linkme.bio/aleponce"
add address=172.16.0.0/12 list=LOCAL-IP comment="By: Ale Ponce - linkme.bio/aleponce"
add address=10.0.0.0/8 list=LOCAL-IP comment="By: Ale Ponce - linkme.bio/aleponce"
/ip firewall nat
add chain=srcnat out-interface="" action=masquerade comment="By: Ale Ponce - linkme.bio/aleponce"
add chain=srcnat out-interface="" action=masquerade comment="By: Ale Ponce - linkme.bio/aleponce"
/ip route
add check-gateway=ping distance=1 gateway="" routing-mark="" comment="By: Ale Ponce - linkme.bio/aleponce"
add check-gateway=ping distance=1 gateway="" routing-mark="" comment="By: Ale Ponce - linkme.bio/aleponce"
add check-gateway=ping distance=1 gateway="" comment="By: Ale Ponce - linkme.bio/aleponce"
add check-gateway=ping distance=2 gateway="" comment="By: Ale Ponce - linkme.bio/aleponce"
/ip firewall mangle
add action=mark-connection chain=prerouting in-interface="" new-connection-mark="" passthrough=yes comment="By: Ale Ponce - linkme.bio/aleponce"
add action=mark-connection chain=prerouting in-interface="" new-connection-mark="" passthrough=yes comment="By: Ale Ponce - linkme.bio/aleponce"
add action=mark-routing chain=output connection-mark="" new-routing-mark="" passthrough=yes comment="By: Ale Ponce - linkme.bio/aleponce"
add action=mark-routing chain=output connection-mark="" new-routing-mark="" passthrough=yes comment="By: Ale Ponce - linkme.bio/aleponce"
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="By: Ale Ponce - linkme.bio/aleponce"
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="By: Ale Ponce - linkme.bio/aleponce"
add action=mark-routing chain=prerouting connection-mark="" dst-address-list=!LOCAL-IP new-routing-mark="" passthrough=yes src-address-list=LOCAL-IP comment="By: Ale Ponce - linkme.bio/aleponce"
add action=mark-routing chain=prerouting connection-mark="" dst-address-list=!LOCAL-IP new-routing-mark="" passthrough=yes src-address-list=LOCAL-IP comment="By: Ale Ponce - linkme.bio/aleponce"

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