From df0cc031392f445a1b16eb1da5d0ff7319e1f943 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 03:24:00 +0000 Subject: [PATCH 1/2] Clean up autorun.scr: fix empty address, formatting, comments --- routeros/autorun.scr | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/routeros/autorun.scr b/routeros/autorun.scr index 01fbbbb..3c3017c 100644 --- a/routeros/autorun.scr +++ b/routeros/autorun.scr @@ -1,11 +1,27 @@ +# RouterOS minimal autorun / bootstrap script +# Basic connectivity + service hardening + time sync. +# Adjust the CHANGE_ME placeholders before importing: +# /import file-name=autorun.scr + +# --------------------------------------------------------------------------- +# Basic connectivity (per-deployment — adjust address / gateway) +# --------------------------------------------------------------------------- /ip address -add address= interface=ether1 network=10.0.0.1 +add address=10.0.0.2/24 interface=ether1 comment="CHANGE_ME: router IP/mask" /ip route -add dst-address=0.0.0.0/0 gateway=10.0.0.1 +add dst-address=0.0.0.0/0 gateway=10.0.0.1 comment="CHANGE_ME: default gateway" /ip dhcp-client add interface=ether1 disabled=yes + +# --------------------------------------------------------------------------- +# Admin user +# --------------------------------------------------------------------------- /user -set 0 password="CHANGE_ME" +set 0 password="CHANGE_ME" + +# --------------------------------------------------------------------------- +# Service / management hardening +# --------------------------------------------------------------------------- /ip service set telnet disabled=yes set ftp disabled=yes @@ -22,6 +38,10 @@ set allowed-interface-list=none set enabled=no /ipv6 settings set disable-ipv6=yes + +# --------------------------------------------------------------------------- +# Time / NTP +# --------------------------------------------------------------------------- /system clock set time-zone-name=Asia/Yekaterinburg /system ntp client From 2092f4e1db46d79c597deec11520ef6580f97327 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 03:26:53 +0000 Subject: [PATCH 2/2] autorun.scr: restore ISP address line with comment, add interface lists and NAT --- routeros/autorun.scr | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/routeros/autorun.scr b/routeros/autorun.scr index 3c3017c..d6fa6ff 100644 --- a/routeros/autorun.scr +++ b/routeros/autorun.scr @@ -7,12 +7,34 @@ # Basic connectivity (per-deployment — adjust address / gateway) # --------------------------------------------------------------------------- /ip address -add address=10.0.0.2/24 interface=ether1 comment="CHANGE_ME: router IP/mask" +add address= interface=ether1 network=10.0.0.1 comment="address issued by ISP" /ip route add dst-address=0.0.0.0/0 gateway=10.0.0.1 comment="CHANGE_ME: default gateway" /ip dhcp-client add interface=ether1 disabled=yes +# --------------------------------------------------------------------------- +# Interface lists +# --------------------------------------------------------------------------- +/interface list +add name=WAN comment="Uplinks / Internet-facing interfaces" +add name=LAN comment="Local trusted networks" +add name=StS comment="Site-to-Site tunnels" +add name=VPN comment="Remote-access VPN clients" + +/interface list member +# Assign your real interfaces here, examples below: +add list=WAN interface=ether1 +# add list=LAN interface=bridge +# add list=StS interface= +# add list=VPN interface= + +# --------------------------------------------------------------------------- +# Firewall NAT +# --------------------------------------------------------------------------- +/ip firewall nat +add action=masquerade chain=srcnat comment="LAN -> Internet" out-interface-list=WAN + # --------------------------------------------------------------------------- # Admin user # ---------------------------------------------------------------------------