Before you start
This is an operator checklist, not an installation script. Review each change on a spare router first. Schedule subscriber downtime for updates and keep local console access plus a second administrator session. For access and firewall edits, enter RouterOS Safe Mode with Ctrl+X, make a small change, test a new connection, then press Ctrl+X to retain it. Safe Mode does not replace an upgrade recovery plan.
The examples target RouterOS v7; v6 differences appear below. Replace every REPLACE_… value, account name and documentation address before running anything. Here, 192.0.2.1 represents the router, 192.0.2.10/32 the management client and 198.51.100.10/32 the administrator. These are documentation addresses, not usable endpoints. Use the source address the router actually sees after any tunnel or NAT. Never paste real passwords into tickets, chat or shared terminal recordings.
Prepare an encrypted backup, a separately stored recovery procedure and a reviewed configuration export using your existing backup process. Treat exports and script output as confidential even when sensitive fields are hidden. Confirm who can restore service if remote access fails. Safe Mode and configuration management.
1. Check for compromise before adding credentials
Inspect locally and compare with an approved configuration. Unknown users, recurring scheduler entries, unfamiliar scripts or an enabled SOCKS proxy warrant investigation; they are indicators, not proof by themselves.
/user print detail
/user active print
/system scheduler print detail
/system script print detail
/ip socks print
/ip firewall filter print detail
If you cannot explain a change, stop onboarding. Isolate management access, preserve evidence privately and rebuild from a trusted image/configuration under your incident process. Rotate exposed credentials from a clean workstation. Deleting one suspicious scheduler is not evidence that the router is clean. Review DNS, NAT and routes too; no short command list proves the absence of compromise. References: users, scheduler, scripts, SOCKS.
2. Update RouterOS, then RouterBOARD firmware
Record the running version and hardware. Select your approved stable or long-term release after reviewing its release notes, hardware support and package changes. The following selects stable and checks; it does not install yet.
/system resource print
/system package print
/system package update set channel=stable
/system package update check-for-updates
Only during the approved maintenance window, install the reviewed release. Installation can reboot the router and interrupt subscribers.
/system package update install
After reconnecting, check RouterBOARD firmware. On RouterBOARD hardware, compare current-firmware and upgrade-firmware, then upgrade if required and reboot again. Skip RouterBOARD commands on CHR/x86.
/system routerboard print
/system routerboard upgrade
/system reboot
Recheck versions, routing and subscriber connectivity after both restarts. v6: a major-version migration may need intermediate releases and package/configuration changes; do not treat it as a routine patch. Follow the upgrade instructions and RouterBOARD reference.
3. Replace default and unused accounts
Create a named human administrator with a unique secret entered privately. This is the recovery/operator account, never the integration account. Test a fresh login from the approved administrator address before disabling admin.
/user add name=operator-example group=full address=198.51.100.10/32 password="REPLACE_UNIQUE_ADMIN_SECRET"
/user disable [find where name="admin"]
After confirming recovery access, remove the disabled default account and only the unused accounts you have identified. Do not bulk-remove users; preserve at least one working full administrator.
/user remove [find where name="admin"]
/user remove [find where name="unused-example"]
4. Start with a limited API account
Create a new custom group for read-only REST inventory. Do not reuse the built-in read group: it includes broader permissions. The current REST documentation specifies both api and rest-api login policies. These user policies do not open the plain API service.
/user group add name=platform-read-example policy=read,api,rest-api
/user add name=platform-example group=platform-read-example address=192.0.2.10/32 password="REPLACE_UNIQUE_API_SECRET"
This deliberately omits write, policy, sensitive, reboot and interactive login permissions. RouterOS permissions are coarse: read access still exposes operational information. Agree the exact required operations with the platform, test them, and use a separately scoped account for any approved mutation. A read-only account is not a promise that backups or every integration feature will work. v6 has no REST API: a separately validated binary API client uses the api policy and certificate-backed api-ssl; do not add rest-api on v6. REST permission requirements.
5. Require HTTPS and verify the router identity
REST is served under /rest by www-ssl. Obtain a server certificate from your approved CA with a subject alternative name matching the router address or DNS name used by the client. Import it and its private key through your secure certificate procedure, then select its placeholder name below. Confirm the certificate is valid and includes its private key before enabling HTTPS.
/certificate print detail
/ip service set www-ssl certificate=router-https-example tls-version=only-1.2 address=192.0.2.10/32 disabled=no
Can a self-signed certificate be acceptable? Yes, for a controlled connection when the client explicitly supports a fail-closed pin of the expected certificate or public key. Verify the fingerprint through a trusted, independent channel before first use, reject a mismatch before sending credentials and plan renewal/rotation. A fingerprint copied from an untrusted first connection does not establish trust. Pinning is a client capability, not a RouterOS service setting; confirm its algorithm and certificate-versus-key format. Do not assume ISPAgents supports that mode. Alternatively, provision a private CA trust anchor with normal name and expiry validation. Never turn off TLS verification to make onboarding succeed.
Keep the private key on approved systems, check clock accuracy and record the expiry owner. See certificates and REST HTTPS setup. Newer v7 manuals call the service source list available-from; if your release exposes that name instead of address, use its documented equivalent. Check command completion for your installed version.
6. Restrict services before connecting the platform
Keep management on a private management path or VPN. Include your tested recovery source in every relevant allowlist; allowlists are not a substitute for an input firewall.
/ip service set ssh address=198.51.100.10/32
/ip service set winbox address=198.51.100.10/32
/ip service disable telnet
/ip service disable ftp
/ip service disable www
/ip service disable api
/ip service disable api-ssl
/ip service print detail
The last disable is appropriate for a REST-only integration; keep certificate-backed api-ssl only if a separately assessed binary client needs it. Disable SSH or WinBox too when no operator needs them. Check MAC WinBox/MAC server, neighbor discovery and RoMON separately because IP service allowlists do not control those paths. REST shares www-ssl with WebFig; review the version-specific webserver controls if only REST should be exposed. Service reference and router hardening.
7. Use SNMPv3 authPriv, or leave SNMP off
If no monitoring client needs SNMP, disable it:
/snmp set enabled=no
For an approved SNMPv3 client, remove the default public community and configure a restricted, read-only identity. Replace both secrets with distinct private values and configure the poller for v3 authPriv, SHA1 and AES to match this documented compatibility example. Check stronger algorithms supported by your particular release and client before choosing them.
If remove is refused, stop before enabling SNMP: restrict the default community with /snmp community set [find name=public] addresses=192.0.2.10/32 (replace with your management source), or leave SNMP disabled; verify with /snmp community print before continuing.
/snmp community remove [find where name="public"]
/snmp community add name=monitor-example addresses=192.0.2.10/32 security=private authentication-protocol=SHA1 authentication-password="REPLACE_SNMP_AUTH_SECRET" encryption-protocol=AES encryption-password="REPLACE_SNMP_PRIV_SECRET" read-access=yes write-access=no
/snmp set enabled=yes
Review and remove any other unneeded communities. v1/v2c community strings do not encrypt traffic. trap-version=3 affects outgoing traps, not the polling security level; configure traps separately only if needed. Restrict UDP 161 to the poller in the firewall. v6: verify the installed release and poller support the same algorithms (AES exists from v6.16). SNMP community and security reference.
8. Review input-chain order without locking yourself out
The input chain protects the router itself; the forward chain handles routed subscriber traffic. Do not replace the existing firewall with a generic paste. Review both IPv4 and IPv6 rules, required DHCP/DNS, routing, VPN and monitoring traffic, and any broad accept rules that would bypass a later restriction.
/ip firewall filter print detail where chain=input
/ipv6 firewall filter print detail where chain=input
The following is an inactive IPv4 review draft: every added rule is disabled. It illustrates order only. Keep your live rules intact, adapt source/interface checks, insert the required service exceptions, then place and enable reviewed rules one at a time in Safe Mode with console recovery available. Appending these after an existing drop will not allow access; appending a drop after a broad accept will not secure it.
/ip firewall filter add chain=input action=accept connection-state=established,related disabled=yes comment="review-example established"
/ip firewall filter add chain=input action=drop connection-state=invalid disabled=yes comment="review-example invalid"
/ip firewall filter add chain=input action=accept protocol=icmp disabled=yes comment="review-example ICMP"
/ip firewall filter add chain=input action=accept protocol=tcp dst-port=22,8291 src-address=198.51.100.10/32 disabled=yes comment="review-example operator"
/ip firewall filter add chain=input action=accept protocol=tcp dst-port=443 src-address=192.0.2.10/32 disabled=yes comment="review-example REST"
/ip firewall filter add chain=input action=drop disabled=yes comment="review-example final drop AFTER required exceptions"
Preserve required ICMP for path discovery. IPv6 needs its own policy, including essential ICMPv6 and neighbor discovery; this IPv4 draft does not protect IPv6. Test fresh allowed and denied connections, not just an already established session. Record rule counters and remove unused draft rules after review. IPv4 and IPv6 filter examples.
9. Record the onboarding decision
- Versions and recovery procedure checked; no unexplained configuration changes remain.
- A named operator owns the router; default and unused accounts are removed.
- The platform has its own limited account and a tested revocation procedure.
- HTTPS identity validation succeeds; incorrect identity is rejected.
- Unapproved sources cannot reach management, over IPv4 or IPv6.
- Plain services are disabled; SNMP is disabled or uses a reviewed v3 identity.
- Allowed reads succeed; unapproved writes fail; subscriber service still works.
Keep this evidence privately with the change record. An ISPAgents automated onboarding security audit is planned, not a shipped assurance. MikroTik RouterOS REST operations are a guided pilot; firmware, reachability, permissions and supported operations need qualification. Read the MikroTik integration scope or discuss a guided pilot. No router credentials are collected by this guide.