Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 2

/ip firewall mangle

add action=mark-connection chain=prerouting comment="InOutSameISP" connection-mark=no-mark in-


interface=ether3-wanA new-connection-mark=conn-WanA

add action=mark-routing chain=output connection-mark=conn-WanA new-routing-mark=lewat-ISP-A

add action=mark-connection chain=prerouting connection-mark=no-mark in-interface=ether4-wanB


new-connection-mark=conn-WanB

add action=mark-routing chain=output connection-mark=conn-WanB new-routing-mark=lewat-ISP-B

Fungsi script di atas adalah agar paket yang sudah melewati ISP A maka pulang pergi harus melewati ISP
A, begitu juga dengan paket yang melewati ISP B.

/ip firewall mangle

add action=mark-connection chain=prerouting comment="Per Connection Load Balance" dst-


port=80,8080 in-interface=wlan1 new-connection-mark=conn-LanA per-connection-classifier=src-
address-and-port:2/0 protocol=tcp src-address=192.168.50.0/24

add action=mark-routing chain=prerouting connection-mark=conn-LanA in-interface=wlan1 new-routing-


mark=lewat-ISP-A passthrough=no

add action=mark-connection chain=prerouting dst-port=80,8080 in-interface=wlan1 new-connection-


mark=conn-LanB per-connection-classifier=src-address-and-port:2/1 protocol=tcp src-
address=192.168.50.0/24

add action=mark-routing chain=prerouting connection-mark=conn-LanB in-interface=wlan1 new-routing-


mark=lewat-ISP-B passthrough=no

add action=mark-connection chain=prerouting comment="Per Address Load Balance" in-interface=wlan1


new-connection-mark=conn-LanA per-connection-classifier=both-addresses:2/0 src-
address=192.168.50.0/24

add action=mark-routing chain=prerouting connection-mark=conn-LanA in-interface=wlan1 new-routing-


mark=lewat-ISP-A passthrough=no

add action=mark-connection chain=prerouting in-interface=wlan1 new-connection-mark=conn-LanB per-


connection-classifier=both-addresses:2/1 src-address=192.168.50.0/24

add action=mark-routing chain=prerouting connection-mark=conn-LanB in-interface=wlan1 new-routing-


mark=lewat-ISP-B passthrough=no

Fungsi Script di atas adalah, menandai koneksi yang sudah di tentukan berdasarkan classifier dan
membuat routing mark berdasarkan koneksi yang sudah di buat.

/ip route

add distance=1 gateway=192.168.86.1 routing-mark=lewat-ISP-A

add distance=2 gateway=192.168.137.1 routing-mark=lewat-ISP-B

You might also like