Port forward dengan dua gateway di mikrotik

 

port forward dua gatewayPort forward dengan dua gateway atau ISP supaya kita bisa akses perangkat  dari dua jalur yang berbeda. Berikut gambarannya :

  • IP internet 1 : 1.2.3.4/30 mikrotik ether1
  • IP internet 2 : 5.6.7.8/30 mikrotik ether2
  • LAN 192.168.1.1/30 mikrotik ether3
  • IP perangkat 192.168.1.2/30 dengan port 8080

Setting mikrotik :

IP address

/ip address add 
address=1.2.3.4/30 interface=ether1
address=5.6.7.8/30 interface=ether2
add address=192.168.1.1/30 interface=ether3

NAT

/ip fire nat 
add chain=dst-nat action=dst-nat in-interface=ether1 dst-address=1.2.3.4 protocol=tcp dst-port=8080 to-address=192.168.1.2
add chain=dst-nat action=dst-nat in-interface=ether2 dst-address=5.6.7.8 protocol=tcp dst-port=8080 to-address=192.168.1.2

Tandai semua koneksi

/ip firewall mangle
add chain=prerouting in-interface=ether1 action=mark-connection dst-address=1.2.3.4 protocol=tcp dst-port=8080 new-connection-mark=ether1-conn
add chain=prerouting in-interface=ether2 action=mark-connection dst-address=5.6.7.8 protocol=tcp dst-port=8080 new-connection-mark=ether2-conn 

Tandai jalur koneksi

/ip firewall mangle
add chain=prerouting in-interface=ether3 connection-mark=ether1-conn action=mark-routing new-routing-mark=jalur1
add chain=prerouting in-interface=ether3 connection-mark=ether2-conn action=mark-routing new-routing-mark=jalur2

Rute

/ip route
add dst-address=0.0.0.0/0 routing-mark=jalur1 gateway=1.2.3.3
add dst-address=0.0.0.0/0 routing-mark=jalur2 gateway=5.6.7.7
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s