Link your MikroTik router
Add a router, paste one script into its terminal, and confirm its certificate fingerprint.
The platform manages your router over HTTPS, through the router's REST API. Linking adds a login just for the platform; your own settings stay as they are.
What you need
- A MikroTik router running RouterOS 7. You can see the version under System › Packages.
- An address where the platform can reach the router from the internet: a public IP address or a DNS name, and its HTTPS port (443 unless you forward another port to the router).
- A login on the router with full rights, in Winbox, WebFig or SSH.
Add the router
- In your portal open Routers and choose Add router.
- Give it a name, and enter its public address and HTTPS port.
- Save. The router's page shows your link script.
Paste the script
- In Winbox or WebFig open New Terminal.
- Paste the whole script and press Enter.
- The last line it prints is
Linked. Certificate fingerprint: …. Keep the terminal open.
The script adds a login for the platform that can only sign in from the platform's address, a certificate the router signs itself, and HTTPS for the platform's address only. Everything it creates is marked saas-managed. If something it needs is already in use, it stops before changing anything.
Check and confirm
- On the router's page choose Check router. The platform connects and reads the certificate the router presents; no password is sent.
- Compare the fingerprint in your portal with the one your terminal printed. They must be exactly the same.
- If they match, choose They match: link this router. If they differ, stop: something else is answering at that address.
From then on the platform only talks to a router that presents that same certificate. It checks the router every minute (CPU, memory, uptime and RouterOS version) and emails you when it stops answering.
Removing a router
The router's page has an unlink script. Paste it into the terminal first: it removes the platform's login and certificates and turns HTTPS off again. Then choose Remove from the platform.