What is the best way to run this script on a new router? I’m trying to cut down on my steps when starting out from scratch. Is there a way to run one script that will do everything, including a reset, and a reboot?
/system reset-configuration no-defaults=yes
y
# set router's identity (for “cosmetic” reasons)
/system identity set name="blog.kaniski.eu"
# add IP address to internal network interface (ether5 in my case)
/ip address add address=10.10.10.254 netmask=255.255.255.0 interface=ether5
# configure DHCP client for wlan1 interface (get IP address from the phone’s DHCP server)
/ip dhcp-client add interface=wlan1 use-peer-dns=yes use-peer-ntp=yes add-default-route=yes disabled=no
# set wireless properties and enable wlan1 interface
/ip neighbor discovery set wlan1 discover=no
/interface wireless security-profiles add name="blog.kaniski.eu" authentication-types=wpa2-psk group-ciphers=aes-ccm mode=dynamic-keys unicast-ciphers=aes-ccm wpa2-pre-shared-key="blog.kaniski.eu"
/interface wireless set wlan1 mode=station security-profile="blog.kaniski.eu" ssid="" band=2ghz-b/g/n channel-width=20/40mhz-ht-above country=croatia frequency=auto
/interface wireless connect-list add security-profile="blog.kaniski.eu" connect=yes ssid="blog.kaniski.eu" interface=wlan1
/interface wireless set wlan1 disabled=no
# masquerade the outgoing traffic on wlan1
/ip firewall nat add chain=srcnat out-interface=wlan1 action=masquerade
# change your admin password
/user set admin password="blog.kaniski.eu"
# reboot the router (not necessary, but it’s something I like to do)
/system reboot
y