Cara 1.
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=client
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=speedy2
add address=192.168.2.2/24 network=10.112.0.0 broadcast=192.168.2.255 interface=speedy1
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1,192.168.2.1 check-gateway=ping
/ip firewall nat
add chain=srcnat out-interface=speedy1 action=masquerade
add chain=srcnat out-interface=speedy2 action=masquerade
/ ip firewall mangle
add chain=input in-interface=speedy1 action=mark-connection new-connection-mark=speedy1_conn
add chain=input in-interface=speedy2 action=mark-connection new-connection-mark=speedy2_conn
add chain=output connection-mark=speedy1_conn action=mark-routing new-routing-mark=to_speedy1
add chain=output connection-mark=speedy2_conn action=mark-routing new-routing-mark=to_speedy2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_speedy1
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_speedy2
Cara 2
/ip address
add address=192.168.10.22/24 network=192.168.10.0 broadcast=192.168.10.255
interface=lan comment="" disabled=no
add address=192.168.1.3/24 network=192.168.1.0 broadcast=192.168.255
interface=speedy1 comment="" disabled=no
add address=192.168.2.11/24 network=192.168.2.0 broadcast=192.168.2.255
interface=speedy2 comment="" disabled=no
/ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=1,2,0
action=mark-connection new-connection-mark=satu passthrough=yes comment=""
disabled=no
add chain=prerouting in-interface=lan connection-mark=satu
action=mark-routing new-routing-mark=satu passthrough=no comment=""
disabled=no
add chain=prerouting in-interface=lan connection-state=new nth=1,2,1
action=mark-connection new-connection-mark=dua passthrough=yes comment=""
disabled=no
add chain=prerouting in-interface=lan connection-mark=dua
action=mark-routing new-routing-mark=dua passthrough=no comment=""
disabled=no
/ip firewall nat
add chain=srcnat connection-mark=satu action=src-nat to-addresses=192.168.1.3
to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=dua action=src-nat to-addresses=192.168.2.11
to-ports=0-65535 comment="" disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10
routing-mark=satu comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.2.2 scope=255 target-scope=10
routing-mark=dua comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.2.2 scope=255 target-scope=10
comment="" disabled=no <<-- ini default route nya
Selamat Mencoba Semoga Sukses
Salam Defble
0 komentar:
Posting Komentar