Balanceo de 3 Linea

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

/interface ethernet

set [ find default-name=ether5 ] name=LAN


set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=WAN1 keepalive-timeout=60 \
max-mru=1480 max-mtu=1480 mrru=1600 name=pppoe-out1 password=speedy \
profile=default service-name="" use-peer-dns=no user=speedy
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=WAN2 keepalive-timeout=60 \
max-mru=1480 max-mtu=1480 mrru=1600 name=pppoe-out2 password=speedy \
profile=default service-name="" use-peer-dns=yes user=speedy
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=WAN3 keepalive-timeout=60 \
max-mru=1480 max-mtu=1480 mrru=1600 name=pppoe-out3 password=speedy \
profile=default service-name="" use-peer-dns=no user=speedy
/ip dns
set servers=200.48.225.130,200.48.225.146
/ip address
add address=192.168.100.1/24 interface=LAN network=192.168.100.0
add address=192.168.30.2/24 interface=WAN1 network=192.168.30.0
add address=192.168.31.2/24 interface=WAN2 network=192.168.31.0
add address=192.168.32.2/24 interface=WAN3 network=192.168.32.0
/ip firewall filter
add action=drop chain=input comment="BLOQUEA SCAN VIA WINBOX" dst-port=5678 \
protocol=udp
add action=drop chain=input comment="Bloqueo Ataques DNS" dst-port=53 \
in-interface=all-ppp protocol=udp
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=masquerade chain=srcnat out-interface=pppoe-out2
add action=masquerade chain=srcnat out-interface=pppoe-out3
/ip firewall address-list
add address=192.168.100.0/24 list=GW01_LAN
/ip firewall mangle
add chain=prerouting dst-address-list=GW01_LAN src-address-list=GW01_LAN
add action=mark-connection chain=forward comment="REGLAS 2" connection-mark=\
no-mark in-interface=pppoe-out1 new-connection-mark=WAN1_conn
add action=mark-connection chain=forward connection-mark=no-mark \
in-interface=pppoe-out2 new-connection-mark=WAN2_conn
add action=mark-connection chain=forward connection-mark=no-mark \
in-interface=pppoe-out3 new-connection-mark=WAN3_conn
add action=mark-connection chain=prerouting comment="REGLAS 3" \
connection-mark=no-mark in-interface=pppoe-out1 new-connection-mark=\
WAN1_conn
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=pppoe-out2 new-connection-mark=WAN2_conn
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=pppoe-out3 new-connection-mark=WAN3_conn
add action=jump chain=prerouting connection-mark=no-mark in-interface=LAN \
jump-target=policy_routing
add action=mark-routing chain=prerouting comment="REGLAS 4" connection-mark=\
WAN1_conn new-routing-mark=WAN1_traffic src-address-list=GW01_LAN
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
new-routing-mark=WAN2_traffic src-address-list=GW01_LAN
add action=mark-routing chain=prerouting connection-mark=WAN3_conn \
new-routing-mark=WAN3_traffic src-address-list=GW01_LAN
add action=mark-routing chain=output comment="REGLAS 5" connection-mark=\
WAN1_conn new-routing-mark=WAN1_traffic
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=WAN2_traffic
add action=mark-routing chain=output connection-mark=WAN3_conn \
new-routing-mark=WAN3_traffic
add action=mark-connection chain=policy_routing comment="REGLAS 6" \
dst-address-type=!local new-connection-mark=WAN1_conn \
per-connection-classifier=both-addresses:3/0
add action=mark-connection chain=policy_routing connection-state=new \
dst-address-type=!local new-connection-mark=WAN2_conn \
per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=policy_routing connection-state=new \
dst-address-type=!local new-connection-mark=WAN3_conn \
per-connection-classifier=both-addresses:3/2
/ip route
add check-gateway=arp distance=1 gateway=pppoe-out1 routing-mark=WAN1_traffic
add check-gateway=arp distance=1 gateway=pppoe-out2 routing-mark=WAN2_traffic
add check-gateway=arp distance=1 gateway=pppoe-out3 routing-mark=WAN3_traffic
add check-gateway=arp distance=1 gateway=pppoe-out1
add check-gateway=arp distance=2 gateway=pppoe-out2
add check-gateway=arp distance=3 gateway=pppoe-out3

You might also like