All Projects → eworm-de → Routeros Scripts

eworm-de / Routeros Scripts

Licence: gpl-3.0
a collection of scripts for Mikrotik RouterOS

Projects that are alternatives of or similar to Routeros Scripts

Xsrv
[mirror] Install and manage self-hosted services/applications, on your own server(s) - ansible collection and utilities
Stars: ✭ 89 (-67.04%)
Mutual labels:  backup, monitoring
proxmox toolbox
A toolbox to get the firsts configurations of Proxmox VE / BS done in no time
Stars: ✭ 158 (-41.48%)
Mutual labels:  backup, update
Kubeadm Workshop
Showcasing a bare-metal multi-platform kubeadm setup with persistent storage and monitoring
Stars: ✭ 593 (+119.63%)
Mutual labels:  makefile, monitoring
java6-to-java8
Guia para ajudar devs Java atualizarem sua certificação Java 6 para Java 8.
Stars: ✭ 42 (-84.44%)
Mutual labels:  certificate, update
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-60.37%)
Mutual labels:  makefile, monitoring
BM
The Utility to Install Songs, Install Mods, Install/Update BMBF, Install HitSounds, download automatically made Playlists, get better support, switch between the modded and unmodded Version of Beat Saber, do full Backups and way more
Stars: ✭ 33 (-87.78%)
Mutual labels:  backup, update
Questdb
An open source SQL database designed to process time series data, faster
Stars: ✭ 7,544 (+2694.07%)
Mutual labels:  monitoring
Cookiecutter Docker Science
Cookiecutter template for data scientists working with Docker containers
Stars: ✭ 267 (-1.11%)
Mutual labels:  makefile
Graphql To Mongodb
Allows for generic run-time generation of filter types for existing graphql types and parsing client requests to mongodb find queries
Stars: ✭ 261 (-3.33%)
Mutual labels:  update
Burry.sh
Cloud Native Infrastructure BackUp & RecoveRY
Stars: ✭ 260 (-3.7%)
Mutual labels:  backup
Kube State Metrics
Add-on agent to generate and expose cluster-level metrics.
Stars: ✭ 3,433 (+1171.48%)
Mutual labels:  monitoring
Sysmon Config
Sysmon configuration file template with default high-quality event tracing
Stars: ✭ 3,287 (+1117.41%)
Mutual labels:  monitoring
Android device oneplus bacon
Stars: ✭ 267 (-1.11%)
Mutual labels:  makefile
Lmnplayer
完整版的ijkplayer,现在自己改一下
Stars: ✭ 263 (-2.59%)
Mutual labels:  makefile
Xestimonitors
An extensible monitoring framework written in Swift
Stars: ✭ 269 (-0.37%)
Mutual labels:  monitoring
Grav
Performance visualisation tools
Stars: ✭ 262 (-2.96%)
Mutual labels:  monitoring
Raspibackup
Backup and restore your running Raspberry
Stars: ✭ 268 (-0.74%)
Mutual labels:  backup
Arm Eabi Toolchain
Makefile & supporting patches/scripts to build a bare metal ARM EABI toolchain.
Stars: ✭ 259 (-4.07%)
Mutual labels:  makefile
Micrometer
An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.
Stars: ✭ 3,173 (+1075.19%)
Mutual labels:  monitoring
Packpack
Simple building of RPMs & Debian packages from git repos
Stars: ✭ 269 (-0.37%)
Mutual labels:  makefile

RouterOS Scripts

GitHub stars GitHub forks GitHub watchers

RouterOS is the operating system developed by MikroTik for networking tasks. This repository holds a number of scripts to manage RouterOS devices or extend their functionality.

Use at your own risk, pay attention to license and warranty!

Requirements

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.

Initial setup

Get me ready!

If you know how things work just copy and paste the initial commands. Remember to edit and rerun global-config-overlay! First time users should take the long way below.

Live presentation

Want to see it in action? I've had a presentation Repository based RouterOS script distribution including demonstation recorded live at MUM Europe 2019 in Vienna.

Be warned! Some details changed. So see the presentation, then follow the steps below for up-to-date commands.

The long way in detail

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.

[[email protected]] > / tool fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/R3.pem" dst-path="letsencrypt-R3.pem"
      status: finished
  downloaded: 4KiBC-z pause]
       total: 4KiB
    duration: 1s

Note that the commands above do not verify server certificate, so if you want to be safe download with your workstations's browser and transfer the files to your MikroTik device.

Then we import the certificates.

[[email protected]] > / certificate import file-name=letsencrypt-R3.pem passphrase=""
     certificates-imported: 3
     private-keys-imported: 0
            files-imported: 1
       decryption-failures: 0
  keys-with-no-certificate: 0

For basic verification we rename the certificates and print their count. Make sure the certificate count is three.

[[email protected]] > / certificate set name="R3" [ find where fingerprint="67add1166b020ae61b8f5fc96813c04c2aa589960796865572a3c7e737613dfd" ]
[[email protected]] > / certificate set name="ISRG-Root-X1" [ find where fingerprint="96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6" ]
[[email protected]] > / certificate set name="DST-Root-CA-X3" [ find where fingerprint="0687260331a72403d909f105e69bcf0d32e1bd2493ffc6d9206d11bcd6770739" ]
[[email protected]] > / certificate print count-only where fingerprint="67add1166b020ae61b8f5fc96813c04c2aa589960796865572a3c7e737613dfd" or fingerprint="96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6" or fingerprint="0687260331a72403d909f105e69bcf0d32e1bd2493ffc6d9206d11bcd6770739"
3

Always make sure there are no certificates installed you do not know or want!

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 download page. The site is crap and a good example how to not do it.

Now let's download the main scripts and add them in configuration on the fly.

[[email protected]] > :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ / system script add name=$Script source=([ / tool fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script) output=user as-value]->"data"); }

The configuration needs to be tweaked for your needs. Edit global-config-overlay, copy configuration from global-config (the one without -overlay).

[[email protected]] > / system script edit global-config-overlay source

And finally load configuration and functions and add the scheduler.

[[email protected]] > / system script { run global-config; run global-config-overlay; run global-functions; }
[[email protected]] > / system scheduler add name="global-scripts" start-time=startup on-event="/ system script { run global-config; run global-config-overlay; run global-functions; }"

The last step is optional: Add this scheduler only if you want the scripts to be updated automatically!

[[email protected]] > / system scheduler add name="ScriptInstallUpdate" start-time=startup interval=1d on-event=":global ScriptInstallUpdate; \$ScriptInstallUpdate;"

Updating scripts

To update existing scripts just run function $ScriptInstallUpdate.

[[email protected]] > $ScriptInstallUpdate

Adding a script

To add a script from the repository run function $ScriptInstallUpdate with a comma separated list of script names.

[[email protected]] > $ScriptInstallUpdate check-certificates,check-routeros-update

Scheduler and events

Most scripts are designed to run regularly from scheduler. We just added check-routeros-update, so let's run it every hour to make sure not to miss an update.

[[email protected]] > / system scheduler add name="check-routeros-update" interval=1h on-event="/ system script run check-routeros-update;"

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.

[[email protected]] > $ScriptInstallUpdate dhcp-to-dns,lease-script
[[email protected]] > / ip dhcp-server set lease-script=lease-script [ find ]
[[email protected]] > / system scheduler add name="dhcp-to-dns" interval=5m on-event="/ system script run dhcp-to-dns;"

There's much more to explore... Have fun!

Available Scripts

Contact

We have a Telegram Group RouterOS-Scripts! Get help, give feedback or just chat - but do not expect free professional support!

Contribute

Thanks a lot for past contributions!

Patches, issues and whishlist

Feel free to contact me via e-mail or open an issue at github.

Donate

This project is developed in private spare time and usage is free of charge for you. If you like the scripts and think this is of value for you or your business please consider to donate with PayPal.

donate with PayPal

Thanks a lot for your support!

License and warranty

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Upstream

URL: GitHub.com

Mirror: eworm.de GitLab.com


▲ Go back to top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].