LB MIX PCC NTH (FIX!!!)

LB MIX PCC NTH (FIX!!!)

LB NTH ROUTE  = Passthrough no !!!!
LB PCC JUMPER = Passthrough no !!!!





## IN OUT Koneksi 2 Line isp
ip firewall mangle
add action=mark-connection chain=prerouting comment="IN/OUT 2 line ISP " in-interface=eth1 new-connection-mark=koneksi-isp1
add action=mark-connection chain=prerouting in-interface=eth2 new-connection-mark=koneksi-isp2
add action=mark-routing chain=output connection-mark=koneksi-isp1 new-routing-mark=dari-isp1
add action=mark-routing chain=output connection-mark=koneksi-isp2 new-routing-mark=dari-isp2

## LB NTH JUMPER (khusus trafik 80)
ip firewall mangle
add action=jump chain=prerouting comment="LB NTH JUMPER [trafik 80]" connection-state=new dst-address-list=!rfc1918 dst-port=80 in-interface=LOKALAN jump-target=nth-balancer protocol=tcp

##Klasifikasi LB NTH BALANCER
add action=mark-connection chain=nth-balancer comment="Klasifikasi LB NTH BALANCER" in-interface=LOKALAN new-connection-mark=NTH-1 nth=2,1
add action=mark-connection chain=nth-balancer comment="Klasifikasi LB NTH BALANCER" in-interface=LOKALAN new-connection-mark=NTH-2 nth=2,2

##LB NTH Route
add action=mark-routing chain=prerouting comment="LB NTH ROUTE" connection-mark=NTH-1 in-interface=LOKALAN new-routing-mark= dari-isp1 passthrough=no

## LB PC Jumper (any trafik)
add action=jump chain=prerouting comment="LB PCC JUMPER [semua trafik]" dst-address-list=!rfc1918 in-interface=LOKALAN jump-target=pcc-balancer protocol=!ospf
add chain=prerouting in-interface=LOKALAN connection-mark=NTH-2 action=mark-routing routing-mark=dari-isp2
add action=jump chain=prerouting dst-address-list=!rfc1918 in-interface=LOKALAN jump-target=pcc-balancer protocol=tcp
add action=jump chain=prerouting dst-address-list=!rfc1918 in-interface=LOKALAN jump-target=pcc-balancer protocol=udp

## Klasifikai LBB PCC BALANCER
add action=mark-connection chain=pcc-balancer comment="Klasifiasi LB PCC BALANCER" in-interface=LOKALAN new-connection-mark=PCC-1 per-connection-classifier=dst-address-and-port:2/0
add action=mark-connection chain=pcc-balancer in-interface=LOKALAN new-connection-mark=PCC-2 per-connection-classifier=dst-address-and-port:2/1

## LB PCC ROUTE
add action=mark-routing chain=prerouting comment="LB PCC ROUTE" connection-mark=PCC-1 in-interface=LOKALAN new-routing-mark=dari-isp1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=PCC-2 in-interface=LOKALAN new-routing-mark=dari-isp2 passthrough=no

## GATEWAY 2 ISP
ip routes
add distance=1 gateway=isp1 routing-mark=dari-isp1 check-gateway=ping
add distance=1 gateway=isp2 routing-mark=dari-isp2 check-gateway=ping
add gateway=isp1 distance=1
add gateway=isp2 distance 2