You are on page 1of 2

SETTING MULTIPLE GATEWAY DI MIKROTIK

Semisal memakai ISP indonet dan ISP netzap.


Mohon penomoran IP disesuaikan dengan kondisi di kantor masing2.
eth1= 1.1.1.1 gateway 2.2.2.2 (Indonet)
eth2= 3.3.3.3 gateway 4.4.4.4 (netzap)
eth3= 192.168.0.0/24 lokal lan
ip direksi 192.168.0.20 - 192.168.0.40 lewat Indonet
ip karyawan 192.168.0.41 - 192.168.0.60 lewat Netzap
/ip address
add address=1.1.1.1
interface="eth1" network=2.2.2.2
add address=3.3.3.3
interface="eth2" network=4.4.4.4
setting address list:
/ip firewall address list
add address=192.168.0.20-192.168.0.40
list=Client lewat Indonet
add address=192.168.0.41-192.168.0.60
list=Client lewat Netzap
setting IP Firewall mangle:
/ip firewall mangle
add chain=prerouting
action=mark-connection
new-connection-mark=Jalur Indonet
passthrough=yes
src-address-list=Client lewat Indonet
disable=no
add chain=prerouting
action=mark-routing
new-routing-mark=Routing Indonet
passthrough=no
in-interface=eth1
connection-mark=Jalur Indonet
disable=no
add chain=prerouting
action=mark-connection
new-connection-mark=Jalur Netzap
passthrough=yes
src-address-list=Client lewat Netzap
disable=no

add chain=prerouting
action=mark-routing
new-routing-mark=Routing Netzap

passthrough=no
in-interface=eth2
connection-mark=Jalur Netzap
disable=no
setting gateway:
/ip route
add dst-address=0.0.0.0/0
gateway=2.2.2.2
distance=1
check-gateway=ping
comment="Gateway Indonet (Default)"
add dst-address=0.0.0.0/0
gateway=4.4.4.4
distance=2
routing-mark=Routing Netzap
comment="Gateway Netzap"
Terakhir, setting nat:
/ip firewall nat
add chain=srcnat
out-interface=eth1
action=masquerade
add chain=srcnat
out-interface=eth2
action=masquerade
add chain=srcnat
out-interface=eth1
src-address-list=Client lewat Indonet
action=netmap
to-addresses=1.1.1.1
add chain=srcnat
out-interface=eth2
src-address-list=Client lewat Netzap
action=netmap
to-addresses=3.3.3.3

You might also like