RouterOS Scripts
Last updated
Was this helpful?
Last updated
Was this helpful?
is the operating system developed by for networking tasks. This repository holds a number of to manage RouterOS devices or extend their functionality.
Use at your own risk, pay attention to !
Latest version of the scripts require recent RouterOS to function properly. Make sure to install latest updates before you begin.
Specific scripts may require even newer RouterOS version.
If you know how things work just copy and paste the . Remember to edit and rerun global-config-overlay
! First time users should take the long way below.
Be warned! Some details changed. So see the presentation, then follow the steps below for up-to-date commands.
The update script does server certificate verification, so first step is to download the certificates. If you intend to download the scripts from a different location (for example from github.com) install the corresponding certificate chain.
Note that the commands above do not verify server certificate, so if you want to be safe download with your workstation's browser and transfer the files to your MikroTik device.
Then we import the certificates.
For basic verification we rename the certifiactes and print their count. Make sure the certificate count is three.
Always make sure there are no certificates installed you do not know or want!
Now let's download the main scripts and add them in configuration on the fly.
Mark global-config-overlay
not to be overwritten by future updates.
And finally load configuration and functions and add the scheduler.
The last step is optional: Add this scheduler only if you want the scripts to be updated automatically!
To update existing scripts just run function $ScriptInstallUpdate
.
To add a script from the repository run function $ScriptInstallUpdate
with a comma separated list of script names.
Some events can run a script. If you want your DHCP hostnames to be available in DNS use dhcp-to-dns
with the events from dhcp server. For a regular cleanup add a scheduler entry.
There's much more to explore... Have fun!
Let's Encrypt
Actually we do not require the certificate named DST Root CA X3
, but as it is used by Let's Encrypt
to cross-sign we install it anyway - this makes sure things do not go wrong if the intermediate certificate is replaced. The IdenTrust certificate should be available from their . The site is crap and a good example how to not do it.
The configuration needs to be tweaked for your needs. Edit global-config-overlay
, copy configuration from (the one without -overlay
).
Most scripts are designed to run regularly from . We just added check-routeros-update
, so let's run it every hour to make sure not to miss an update.