HOME

LB PCC / LOAD BALANCING PCC SCRIPT GENERATOR FOR MIKROTIK ROUTEROS

Script Generator Result
################################################
# LOAD BALANCING (LB) PCC SCRIPT GENERATOR
# Date/Time:
# https://fb.me/buananet.pbun
# Load Balancing Metode -> PCC
################################################

/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=input in-interface="" new-connection-mark="" passthrough=yes comment="LB By BNT"
add action=mark-connection chain=input 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 dst-address-type=!local new-connection-mark="" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0 src-address-list=LOCAL-IP comment="LB By BNT"
add action=mark-connection chain=prerouting dst-address-list=!LOCAL-IP dst-address-type=!local new-connection-mark="" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1 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=yes 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=yes src-address-list=LOCAL-IP comment="LB By BNT"

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