herramientas / mikrotik
Completa los datos de tu router y obtén un script de RouterOS v7 con una configuración de oficina segura: bridge LAN con DHCP, salida a Internet con NAT, el firewall base y el acceso de administración limitado. Cada parte se explica en el bloque MikroTik.
para qué sirve
Para dejar un router MikroTik de oficina funcionando y seguro desde cero, sin olvidar un paso. Acá respondes qué conexión tienes y sale el script completo: internet, red local, NAT y el firewall que no te deja expuesto.
# Configuración inicial generada en RutaRoot para RouterOS v7. # Aplicar en un equipo sin configuración y en modo seguro (Ctrl+X). /system identity set name=R1-Oficina # Usuario propio (cambia la contraseña después de pegar el script). /user add name=jperez group=full password="CAMBIAR-ESTA-CLAVE" address=10.10.0.0/24 # LAN: bridge, IP, DHCP y DNS /interface bridge add name=bridge-lan protocol-mode=rstp /interface bridge port add bridge=bridge-lan interface=ether2 /interface bridge port add bridge=bridge-lan interface=ether3 /interface bridge port add bridge=bridge-lan interface=ether4 /interface bridge port add bridge=bridge-lan interface=ether5 /ip address add address=10.10.0.1/24 interface=bridge-lan comment="LAN" /ip pool add name=pool-lan ranges=10.10.0.100-10.10.0.200 /ip dhcp-server add name=dhcp-lan interface=bridge-lan address-pool=pool-lan lease-time=1d disabled=no /ip dhcp-server network add address=10.10.0.0/24 gateway=10.10.0.1 dns-server=10.10.0.1 /ip dns set servers=1.1.1.1,8.8.8.8 allow-remote-requests=yes # WAN /ip dhcp-client add interface=ether1 add-default-route=yes use-peer-dns=no disabled=no # Listas de interfaces que usan el firewall y los servicios /interface list add name=LAN /interface list add name=WAN /interface list member add list=LAN interface=bridge-lan /interface list member add list=WAN interface=ether1 /ip firewall address-list add list=GESTION address=10.10.0.0/24 # NAT /ip firewall nat add chain=srcnat out-interface-list=WAN action=masquerade comment="Salida a Internet" # Firewall base /ip firewall filter add chain=input action=accept connection-state=established,related,untracked comment="input: respuestas" add chain=input action=drop connection-state=invalid comment="input: inválidos" add chain=input action=accept protocol=icmp comment="input: ICMP" add chain=input action=accept src-address-list=GESTION in-interface-list=LAN comment="input: gestión" add chain=input action=accept in-interface-list=LAN protocol=udp dst-port=53,67 comment="input: DNS y DHCP de la LAN" add chain=input action=accept in-interface-list=LAN protocol=tcp dst-port=53 comment="input: DNS por TCP de la LAN" add chain=input action=drop comment="input: todo lo demás" add chain=forward action=fasttrack-connection connection-state=established,related hw-offload=yes comment="forward: fasttrack" add chain=forward action=accept connection-state=established,related,untracked comment="forward: respuestas" add chain=forward action=drop connection-state=invalid comment="forward: inválidos" add chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface-list=WAN comment="forward: nada nuevo desde la WAN" # Servicios y descubrimiento solo en la LAN /ip service disable telnet,ftp,www,api,api-ssl /ip service set winbox address=10.10.0.0/24 /ip service set ssh address=10.10.0.0/24 /tool mac-server set allowed-interface-list=none /tool mac-server mac-winbox set allowed-interface-list=LAN /ip neighbor discovery-settings set discover-interface-list=LAN /tool bandwidth-server set enabled=no /ip ssh set strong-crypto=yes # Hora /system ntp client set enabled=yes servers=pool.ntp.org # Al final, desde una sesión con el usuario jperez: /user disable admin
Revisa el script antes de aplicarlo y cambia la contraseña de ejemplo. Pégalo en la terminal de un equipo sin configuración (/system reset-configuration no-defaults=yes), conectado por un puerto LAN y en modo seguro. La lógica de cada bloque se explica en el bloque MikroTik de la guía.
ruta guiada · redes y ccna · especialización · etapa 6 de 16 · MikroTik RouterOS: puesta en marcha, LAN y seguridad
Siguiente etapa (MikroTik RouterOS: Wi-Fi, colas, VPN y monitoreo): MikroTik · Módulo 7: Redes inalámbricas: paquetes wireless y wifi, modos, seguridad y CAPsMAN