Set 0 name=modem1
Set 1 name=modem2
Set 2 name=local
============================================================================
/ip address
add address=192.168.1.2/24 netmask=255.255.255.0 interface=modem1
add address=192.168.2.2/24 netmask=255.255.255.0 interface=modem2
add address=192.168.20.1/24 netmask=255.255.255.0 interface=local
============================================================================
/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=modem1
passthrough=yes connection-state=new in-interface=local nth=2,1
add chain=prerouting action=mark-routing new-routing-mark=modem1
passthrough=no in-interface=local connection-mark=modem1
add chain=prerouting action=mark-connection new-connection-mark=modem2
passthrough=yes connection-state=new in-interface=local nth=2,2
add chain=prerouting action=mark-routing new-routing-mark=modem2
passthrough=no in-interface=local connection-mark=modem2
============================================================================
/ip firewall nat
add chain=srcnat action=masquerade out-interface=modem1
add chain=srcnat action=masquerade out-interface=modem2
============================================================================
/ip route
add gateway=192.168.1.1
add gateway=192.168.2.1 routing-mark=modem2
0 komentar:
Posting Komentar