MikroTik RouterOS devices are cheap, capable and everywhere, from ISP edges to branch offices, and attackers keep turning poorly managed ones into proxies and botnet nodes using RouterOS's own features. That abuse typically relies on exposed management services, leaked passwords and altered configuration such as scheduler scripts, SOCKS proxies and L2TP tunnels, all settings the customer controls. This guide covers how RouterOS users, groups and services work, the credentials a router holds, logging, the device-mode feature, and a hardening baseline built from MikroTik's documentation. It is for network engineers at ISPs, managed service providers and organisations running RouterOS. For consumer routers, see the Securing Your Home Router Guide.
This is an independent guide from NHI Mgmt Group, based on MikroTik's public documentation as of November 2026. It is not sponsored or reviewed by MikroTik. Product features change, so confirm settings against MikroTik's current documentation.
Key takeaways
- Upgrading is not enough after exposure. MikroTik's advice is that an upgrade alone does not help if the password was already exposed: change the password and audit the configuration too.
- Every management service is open by default at the service level. The
addressproperty on/ip serviceentries is blank by default, so restrict it and block management ports from untrusted networks with input chain firewall rules. - Disable the default admin and use groups. MikroTik recommends creating a named user in the
fullgroup and disablingadmin; custom groups limit what operators can do, since even the built-inreadgroup has sensitive and reboot rights. - Use device-mode to remove attacker tooling. From RouterOS 7.17, device-mode can disable features such as Scheduler, SOCKS, Fetch, Proxy and Bandwidth-test, and changing it needs physical confirmation at the router.
- Do not trust the LAN. MikroTik warns that malware on a Windows machine inside the network can try to reconfigure the router, so MAC-WinBox, neighbour discovery and LAN-side management need restricting too.
How identity and access work in RouterOS
RouterOS authenticates administrators against a local user database, optionally followed by RADIUS. The local database is checked first, and RADIUS is used only if the username is not found locally. Each user belongs to one group, and the group's policies decide both how the user may sign in and what they may do.
| Management service | Default port | Notes |
|---|---|---|
| telnet | 23/tcp | Clear text; disable |
| ftp | 21/tcp | Clear text; disable unless used for a controlled file transfer |
| www (WebFig) | 80/tcp | Clear text; disable and use www-ssl if web management is needed |
| ssh | 22/tcp | Set /ip ssh set strong-crypto=yes; prefer keys |
| www-ssl | 443/tcp | No certificate by default; assign one and set tls-version=only-1.2 |
| api | 8728/tcp | Clear text; disable in favour of api-ssl |
| api-ssl | 8729/tcp | No certificate by default; assign one |
| winbox | 8291/tcp | Restrict to management networks |
Two more access paths sit outside /ip service. The MAC server allows MAC-Telnet, MAC-WinBox and MAC-Ping from any layer 2 neighbour, and neighbour discovery advertises the device to its segment. MikroTik's securing guidance disables both: /tool mac-server set allowed-interface-list=none, /tool mac-server mac-winbox set allowed-interface-list=none, /tool mac-server ping set enabled=no and /ip neighbor discovery-settings set discover-interface-list=none. If you need layer 2 access for recovery, allow it only on a dedicated management interface list rather than none.
MikroTik notes that the service address property denies access at the service level but does not drop packets, so it is for trusted networks. Against untrusted networks, use firewall filter rules in the input chain and keep the pre-configured default rules that block WAN connections.
Admin roles and privileged access
Groups are made of policies. Login policies are local, telnet, ssh, web, winbox, password, api, rest-api, ftp and romon. Configuration policies are reboot, read, write, policy, test, sensitive and sniff. A ! prefix negates a policy.
| Group | What it allows | Use for |
|---|---|---|
| full | Every policy, including policy (user management) and ftp | Two or three named senior engineers; the disabled admin as break-glass |
| write | Read plus write, without ftp or policy | Operators who change routing and firewall configuration |
| read | Login, read, test, sensitive, reboot and related | Not for untrusted users: MikroTik warns it still includes sensitive and reboot rights |
| Custom monitoring group | For example ssh,read,!sensitive,!reboot style policies (test before use) | Monitoring and NOC staff |
| Custom automation group | api or rest-api login with only the configuration policies the tool needs | Provisioning and monitoring systems |
- Replace admin:
/user add name=<name> password=<password> group=full, then/user disable admin. Theadminaccount always exists, and at least one user with full rights must remain. - Password policy: MikroTik recommends at least 12 characters with mixed character types and no dictionary words. Set
minimum-password-lengthandminimum-categories(0 to 4) in user settings, and use the expire-password action to force a change. - Per-user source restriction: each user has an
addressproperty listing the networks it may sign in from. Set it for every administrator. - SSH keys: RouterOS accepts RSA, Ed25519 and Ed25519-sk public keys (the last allows a hardware security key). Once a key is added for a user, password SSH login is disabled by default for that user.
- RADIUS: with
use-radiuson, setdefault-grouptoreador a custom low group and useexclude-groupsso a RADIUS reply cannot escalate a user intofull. WinBox needs CHAP on the RADIUS server. Central authentication makes joiner and leaver handling far easier across many routers. - Sessions:
/user active printshows who is signed in and how,/user/active/request-logoutends a session, and an inactivity policy can log out or lock sessions (default 10 minutes).
For estates of hundreds of routers, treat RouterOS credentials as privileged access: vault the break-glass password per device, and see the Privileged Access Management Guide.
Integrations, API tokens and service accounts
A router holds credentials for other systems, and an attacker with access can add their own.
- Automation accounts: monitoring and provisioning tools use the API, REST API or SSH. Give each tool its own user in a custom group, restrict its
addressto the tool's host, use api-ssl or SSH keys, and rotate on staff or supplier change. - RADIUS shared secrets: unique per router, long and random, recorded in your secrets inventory.
- VPN credentials: WireGuard keys, IPsec pre-shared keys and certificates, and PPP secrets for L2TP or PPTP clients. MikroTik recommends a VPN (WireGuard or IPsec) for any remote access. Audit for tunnels you did not create: Mēris added an L2TP client named
lvpn. - Router-held SSH private keys: RouterOS can store RSA or Ed25519 private keys to log in to other devices. These are machine credentials that let a compromised router move laterally; inventory them.
- Cloud and DDNS: MikroTik's guidance disables
/ip cloudDDNS if unused (ddns-enabled=no update-time=no), which also stops the router advertising a stable public name. - Configuration exports and backups: backups and exports can contain secrets. Store them encrypted, off the device, with access limited to the network team.
The Service Account Security Guide covers ownership and rotation for the automation accounts.
Security updates and patching
MikroTik publishes security announcements on its security page and fixes in RouterOS release notes; apply MikroTik's security updates promptly. NHI Mgmt Group recommendation: disable services you do not use, such as /tool bandwidth-server, and keep user groups minimal so exposure stays low between releases, then follow the steps below.
- Inventory: list every RouterOS device, its version, its device-mode and which services are reachable from where. Include customer premises equipment if you are an ISP.
- Upgrade: use "check for updates" in WinBox or WebFig or
/system package update, plus RouterBOARD firmware where needed. Stage on a lab device of the same model first. - Prevent downgrade: RouterOS's
allowed-versionssetting lists versions MikroTik considers secure and blocks step-by-step downgrades to vulnerable releases. - Rotate: after upgrading any device that was exposed, change every password and key it held, then audit the configuration as in the next section.
- Roll back: take an exported configuration and a backup before upgrading, and keep console or out-of-band access to recover a device that fails to boot. The Emergency Out-of-Band Patching Playbook covers urgent rollouts.
Logging and detection
RouterOS logging is set under /system logging with topics (account for logins, critical, info, firewall, system) and actions (memory, disk, echo, remote). The memory buffer holds 1000 lines by default and is lost on reboot, so add a remote action pointing at your syslog collector. The default remote address is 0.0.0.0:514, so you must set it. Syslog format uses UDP; TCP and TLS work only with the CEF log format, and check-certificate defaults to no, so turn it on if you use TLS.
| What to look for | Where | Technique or reason |
|---|---|---|
| Scheduler entries running Fetch scripts | System > Scheduler, config diff | Mēris persistence (T1053) |
| SOCKS proxy enabled under IP > Socks | Config diff | Router used as a proxy (T1090) |
Unknown L2TP clients, such as one named lvpn | Interfaces, PPP | Tunnel to attacker infrastructure (T1572) |
| Input firewall rules allowing port 5678 or other unexpected ports | IP > Firewall | Opened remote access |
Logins from new addresses or by admin | account topic via remote syslog | Valid account use (T1078) |
| Bursts of failed logins on SSH or WinBox | account and system topics | Brute force (T1110) |
Device flagged status set | System, device-mode | RouterOS detected suspicious configuration at startup and disabled it |
| Traffic volumes from the router itself far above baseline | Upstream NetFlow | Botnet denial of service participation (T1498) |
Because an attacker with full rights can change logging, keep a known-good configuration export for each device and diff it on a schedule from a central system. The Edge Device Compromise Investigation Playbook covers what to do when the diff shows something you did not do.
Metrics:
- Percentage of devices with management services reachable only from management networks (target: 100%).
- Percentage of devices on a current release with MikroTik's latest security fixes.
- Number of devices where
adminis enabled or a shared password is in use (target: zero). - Percentage of devices sending
accountandcriticallogs to remote syslog. - Number of unexplained configuration differences found per month, and time to resolve each.
Hardening baseline
- Upgrade RouterOS and set
allowed-versionswhere available. - Users: named users in appropriate groups,
admindisabled, password policy set, per-useraddress, SSH keys, RADIUS withexclude-groupsfor larger estates. - Services: disable telnet, ftp, www and api; keep ssh, winbox, www-ssl or api-ssl only where needed, with
addressrestricted, certificates assigned andtls-version=only-1.2. - Firewall: keep the default input rules that block WAN connections; allow management only from management prefixes; reach the router remotely over WireGuard or IPsec.
- Layer 2 exposure: MAC server, MAC-WinBox and MAC-Ping limited to none or a management list; neighbour discovery off.
- Unused features:
/tool bandwidth-server set enabled=no,/ip dns set allow-remote-requests=nounless the router is a resolver, and proxy, SOCKS, UPnP and cloud DDNS off. Disable unused interfaces and, on RouterBOARDs with an LCD, set a PIN or disable it. - Device-mode: choose the most restrictive mode the device's role allows. Home mode removes Scheduler, SOCKS, Fetch, Proxy, Bandwidth-test, Sniffer and RoMON; basic keeps Scheduler, Fetch, Sniffer and RoMON but removes SOCKS, Proxy and Bandwidth-test. Changing mode needs a button press or power cycle within the activation timeout (default 5 minutes) and reboots the device, so plan it with site access.
- SSH:
/ip ssh set strong-crypto=yes. - Logging: remote syslog for
account,critical,systemand firewall drop rules.
Small vs large estates: a single branch router benefits most from steps 1 to 5 and device-mode. An ISP or MSP with thousands of devices needs RADIUS for administrators, per-tool automation accounts, central configuration diffing, and a plan for customer devices it does not physically control, where device-mode changes are hard to confirm. See also the SOHO and SMB Router Hardening Guide.
Common misconfigurations
- WinBox open to the internet: keep it reachable only from management networks.
- Patching without rotating: devices upgraded after 2018 but with the same password stayed in attacker hands.
- Relying on service
addressalone: it does not drop packets; the service still sees the traffic, so pair it with input firewall rules. - Read group for untrusted staff: the built-in
readgroup can still see sensitive data and reboot the router. - RADIUS without
exclude-groups: a misconfigured or compromised RADIUS server can hand outfullrights. - Open DNS resolver:
allow-remote-requests=yeswith no input filtering turns the router into a reflection amplifier.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|---|
| Upgrades and allowed versions | SI-2, RA-5 | ID.RA-01, PR.PS-02 | Control 7 | A.8.8 |
| Services, device-mode, unused features | CM-6, CM-7 | PR.PS-01 | Controls 4 and 12 | A.8.9 |
| Users, groups, RADIUS | AC-6, IA-2, IA-5 | PR.AA-01, PR.AA-05 | Controls 5 and 6 | A.8.2, A.8.5 |
| Management network and input filtering | SC-7, AC-17 | PR.IR-01 | Controls 12 and 13 | A.8.20 |
| Remote logging and configuration diffing | AU-6, AU-12, SI-4, CM-8 | PR.PS-04, DE.CM-09 | Control 8 | A.8.15, A.8.16 |
Practitioner checklist
- Inventory every RouterOS device with version, device-mode and service exposure.
- Apply MikroTik's latest security updates; rotate all passwords and keys on devices that were exposed.
- Create named users, disable
admin, set password policy and per-useraddress. - Disable telnet, ftp, www and api; restrict and certificate-protect the rest.
- Keep input firewall rules blocking WAN management; use WireGuard or IPsec for remote access.
- Turn off MAC server access, neighbour discovery, bandwidth server, DNS remote requests, SOCKS, proxy, UPnP and cloud DDNS where unused.
- Set the most restrictive device-mode the role allows.
- Audit for scheduler scripts, SOCKS, unknown L2TP clients and unexpected input rules.
- Send
accountandcriticallogs to remote syslog and diff configuration centrally.
Standards and references
- MikroTik: Securing your router
- MikroTik: User
- MikroTik: Services
- MikroTik: Device-mode
- MikroTik: Log
- MITRE ATT&CK: Compromise Infrastructure: Network Devices
Related NHI Mgmt Group resources: SOHO and SMB Router Hardening Guide · Securing Your Home Router Guide · Edge Device Security Guide · Edge Device Exploitation by Threat Actors Guide