Join our Newsletter — 33% off our NHI Course
Home› Guides› MikroTik RouterOS Hardening Guide: Lock Down Services, Users…
Guide Network Security

MikroTik RouterOS Hardening Guide: Lock Down Services, Users and Device Mode

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 12 min read
On this page

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 address property on /ip service entries 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 full group and disabling admin; custom groups limit what operators can do, since even the built-in read group 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 serviceDefault portNotes
telnet23/tcpClear text; disable
ftp21/tcpClear text; disable unless used for a controlled file transfer
www (WebFig)80/tcpClear text; disable and use www-ssl if web management is needed
ssh22/tcpSet /ip ssh set strong-crypto=yes; prefer keys
www-ssl443/tcpNo certificate by default; assign one and set tls-version=only-1.2
api8728/tcpClear text; disable in favour of api-ssl
api-ssl8729/tcpNo certificate by default; assign one
winbox8291/tcpRestrict 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.

GroupWhat it allowsUse for
fullEvery policy, including policy (user management) and ftpTwo or three named senior engineers; the disabled admin as break-glass
writeRead plus write, without ftp or policyOperators who change routing and firewall configuration
readLogin, read, test, sensitive, reboot and relatedNot for untrusted users: MikroTik warns it still includes sensitive and reboot rights
Custom monitoring groupFor example ssh,read,!sensitive,!reboot style policies (test before use)Monitoring and NOC staff
Custom automation groupapi or rest-api login with only the configuration policies the tool needsProvisioning and monitoring systems
  • Replace admin: /user add name=<name> password=<password> group=full, then /user disable admin. The admin account 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-length and minimum-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 address property 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-radius on, set default-group to read or a custom low group and use exclude-groups so a RADIUS reply cannot escalate a user into full. WinBox needs CHAP on the RADIUS server. Central authentication makes joiner and leaver handling far easier across many routers.
  • Sessions: /user active print shows who is signed in and how, /user/active/request-logout ends 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 address to 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 cloud DDNS 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.

  1. 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.
  2. 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.
  3. Prevent downgrade: RouterOS's allowed-versions setting lists versions MikroTik considers secure and blocks step-by-step downgrades to vulnerable releases.
  4. Rotate: after upgrading any device that was exposed, change every password and key it held, then audit the configuration as in the next section.
  5. 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 forWhereTechnique or reason
Scheduler entries running Fetch scriptsSystem > Scheduler, config diffMēris persistence (T1053)
SOCKS proxy enabled under IP > SocksConfig diffRouter used as a proxy (T1090)
Unknown L2TP clients, such as one named lvpnInterfaces, PPPTunnel to attacker infrastructure (T1572)
Input firewall rules allowing port 5678 or other unexpected portsIP > FirewallOpened remote access
Logins from new addresses or by adminaccount topic via remote syslogValid account use (T1078)
Bursts of failed logins on SSH or WinBoxaccount and system topicsBrute force (T1110)
Device flagged status setSystem, device-modeRouterOS detected suspicious configuration at startup and disabled it
Traffic volumes from the router itself far above baselineUpstream NetFlowBotnet 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 admin is enabled or a shared password is in use (target: zero).
  • Percentage of devices sending account and critical logs to remote syslog.
  • Number of unexplained configuration differences found per month, and time to resolve each.

Hardening baseline

  1. Upgrade RouterOS and set allowed-versions where available.
  2. Users: named users in appropriate groups, admin disabled, password policy set, per-user address, SSH keys, RADIUS with exclude-groups for larger estates.
  3. Services: disable telnet, ftp, www and api; keep ssh, winbox, www-ssl or api-ssl only where needed, with address restricted, certificates assigned and tls-version=only-1.2.
  4. Firewall: keep the default input rules that block WAN connections; allow management only from management prefixes; reach the router remotely over WireGuard or IPsec.
  5. Layer 2 exposure: MAC server, MAC-WinBox and MAC-Ping limited to none or a management list; neighbour discovery off.
  6. Unused features: /tool bandwidth-server set enabled=no, /ip dns set allow-remote-requests=no unless 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.
  7. 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.
  8. SSH: /ip ssh set strong-crypto=yes.
  9. Logging: remote syslog for account, critical, system and 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 address alone: 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 read group can still see sensitive data and reboot the router.
  • RADIUS without exclude-groups: a misconfigured or compromised RADIUS server can hand out full rights.
  • Open DNS resolver: allow-remote-requests=yes with no input filtering turns the router into a reflection amplifier.

Framework mapping

Control areaNIST SP 800-53 Rev. 5NIST CSF 2.0CIS Controls v8.1ISO/IEC 27001:2022 Annex A
Upgrades and allowed versionsSI-2, RA-5ID.RA-01, PR.PS-02Control 7A.8.8
Services, device-mode, unused featuresCM-6, CM-7PR.PS-01Controls 4 and 12A.8.9
Users, groups, RADIUSAC-6, IA-2, IA-5PR.AA-01, PR.AA-05Controls 5 and 6A.8.2, A.8.5
Management network and input filteringSC-7, AC-17PR.IR-01Controls 12 and 13A.8.20
Remote logging and configuration diffingAU-6, AU-12, SI-4, CM-8PR.PS-04, DE.CM-09Control 8A.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-user address.
  • 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 account and critical logs to remote syslog and diff configuration centrally.

Standards and references

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

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.