Anda di halaman 1dari 2

/ip address

add address=192.168.10.254/24 network=192.168.10.0 broadcast=192.168.10.255 inte


rface=Ether5-Lan
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface
=Ether1-WAN
add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface
=Ether2-WAN
add address=192.168.3.1/24 network=192.168.3.0 broadcast=192.168.3.255 interface
=Ether3-WAN
add address=192.168.4.1/24 network=192.168.4.0 broadcast=192.168.4.255 interface
=Ether4-WAN
/ip firewall mangle
add chain=input in-interface=Ether1-WAN action=mark-connection new-connection-ma
rk=Ether1-WAN_conn
add chain=input in-interface=Ether2-WAN action=mark-connection new-connection-ma
rk=Ether2-WAN_conn
add chain=input in-interface=Ether3-WAN action=mark-connection new-connection-ma
rk=Ether3-WAN_conn
add chain=input in-interface=Ether4-WAN action=mark-connection new-connection-ma
rk=Ether4-WAN_conn
add chain=output connection-mark=Ether1-WAN_conn action=mark-routing new-routing
-mark=to_Ether1-WAN
add chain=output connection-mark=Ether2-WAN_conn action=mark-routing new-routing
-mark=to_Ether2-WAN
add chain=output connection-mark=Ether3-WAN_conn action=mark-routing new-routing
-mark=to_Ether3-WAN
add chain=output connection-mark=Ether4-WAN_conn action=mark-routing new-routing
-mark=to_Ether4-WAN
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Ether
5-Lan
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Ether
5-Lan
add chain=prerouting dst-address=192.168.3.0/24 action=accept in-interface=Ether
5-Lan
add chain=prerouting dst-address=192.168.4.0/24 action=accept in-interface=Ether
5-Lan
add chain=prerouting dst-address-type=!local in-interface=Ether5-Lan per-connect
ion-classifier=both-addresses:4/0 \ action=mark-connection new-connection-mark=E
ther1-WAN_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Ether5-Lan per-connect
ion-classifier=both-addresses:4/1 \ action=mark-connection new-connection-mark=E
ther2-WAN_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Ether5-Lan per-connect
ion-classifier=both-addresses:4/2 \ action=mark-connection new-connection-mark=E
ther3-WAN_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Ether5-Lan per-connect
ion-classifier=both-addresses:4/3 \ action=mark-connection new-connection-mark=E
ther4-WAN_conn passthrough=yes
add chain=prerouting connection-mark=Ether1-WAN_conn in-interface=Ether5-Lan act
ion=mark-routing new-routing-mark=to_Ether1-WAN
add chain=prerouting connection-mark=Ether2-WAN_conn in-interface=Ether5-Lan act
ion=mark-routing new-routing-mark=to_Ether2-WAN
add chain=prerouting connection-mark=Ether3-WAN_conn in-interface=Ether5-Lan act
ion=mark-routing new-routing-mark=to_Ether3-WAN
add chain=prerouting connection-mark=Ether4-WAN_conn in-interface=Ether5-Lan act
ion=mark-routing new-routing-mark=to_Ether4-WAN
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.254 routing-mark=to_Ether1-WAN check
-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.254 routing-mark=to_Ether2-WAN check
-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.254 routing-mark=to_Ether3-WAN check
-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.254 routing-mark=to_Ether4-WAN check
-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.254 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.254 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.254 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.254 distance=4 check-gateway=ping
/ip firewall nat
add chain=srcnat out-interface=Ether1-WAN action=masquerade
add chain=srcnat out-interface=Ether2-WAN action=masquerade
add chain=srcnat out-interface=Ether3-WAN action=masquerade
add chain=srcnat out-interface=Ether4-WAN action=masquerade

Anda mungkin juga menyukai