Top 7 Steps to Integrate MikroTik RADIUS Authentication for PPPoE, Hotspot, and Admin Access

Top 7 Steps to Integrate MikroTik RADIUS Authentication for PPPoE, Hotspot, and Admin Access

Build a scalable, secure, and auditable AAA platform for RouterOS networks.

RADIUS—Remote Authentication Dial-In User Service—gives MikroTik operators a central location to manage authentication, authorization, and accounting. Instead of maintaining separate credentials, subscriber profiles, rate limits, and access policies on every router, RADIUS allows those decisions to be made from one controlled system.

RouterOS can use RADIUS for PPP and PPPoE, Hotspot, router administrative login, wireless, DHCP authentication, IPsec, and 802.1X services. A properly designed deployment improves consistency, simplifies provisioning, supports accounting, and provides better visibility into who connected, when they connected, and what policy was applied.

Important: RADIUS is not simply a username-and-password server. A well-designed RADIUS platform returns policy—such as rate limits, IP assignments, VLAN information, session timers, and RouterOS group permissions—while creating an auditable record of every session.

1. Define the Authentication Architecture Before Configuring Routers

RADIUS deployments often become difficult when authentication requirements were never documented. Before changing a MikroTik router, define which services will authenticate through RADIUS, where credentials will be stored, which attributes must be returned after login, and how the network should behave if RADIUS becomes unavailable.

Start by inventorying every authentication consumer:

  • PPPoE subscribers: typically require credentials, address assignment, bandwidth policy, session limits, and accounting.
  • Hotspot users: may require captive-portal login, vouchers, time limits, service packages, and bandwidth controls.
  • Router administrators: should receive role-based RouterOS permissions for SSH, WinBox, WebFig, or API access.
  • Accounting systems: need session start, interim update, stop, byte-count, and session-duration data.
  • Other services: may include wireless authentication, DHCP authentication, IPsec, or 802.1X.

Also document operational requirements: concurrent session count, reconnect-storm authentication rate, acceptable authentication latency, accounting retention, and failover behavior. An environment that denies all subscriber access during a RADIUS outage has a very different risk profile than one that has a tested local or cached fallback design.

Takeaway: Create a one-page AAA requirements document. List every service, required RADIUS attributes, accounting expectations, acceptable failure behavior, and ownership of the identity database.

2. Deploy and Harden the RADIUS Server

The RADIUS server is a critical trust component. It should reside on a dedicated management or service network—not on a subscriber-facing VLAN—and it should accept requests only from known network access servers.

Standard RADIUS ports are UDP 1812 for authentication and UDP 1813 for accounting. Older environments may still use UDP 1645 and 1646, but new deployments should use the current standard ports whenever possible.

  • Use a unique, long shared secret for every router or defined group of routers.
  • Restrict UDP 1812 and 1813 to authorized MikroTik source addresses only.
  • Disable unused authentication methods and services on the RADIUS host.
  • Synchronize time with NTP for accurate accounting records and incident correlation.
  • Use strong credential hashing supported by the selected RADIUS platform.
  • Protect the RADIUS database and logs as sensitive infrastructure data.
  • Log rejected requests with the NAS address, username, and rejection reason.
  • Deploy a secondary RADIUS server and test failover before production use.

Takeaway: Treat the RADIUS platform like core infrastructure. Document the host addresses, allowed NAS clients, shared secrets, failover order, backup process, and monitoring requirements.

Centralize AAA without merging service policy. Authentication, authorization, and accounting across separate RouterOS services
RouterOS acts as the network access server. Each consuming service must be enabled and tested separately, including the attributes it accepts and applies. Select the illustration for a larger view.

3. Configure RouterOS as a RADIUS Client

RouterOS RADIUS client entries are configured under /radius. Each entry identifies the server, shared secret, supported services, source address, timeout behavior, and accounting settings.

Use an explicit router management or loopback address as the RADIUS source address whenever possible. This gives the RADIUS server a predictable NAS source address, simplifies firewall policy, and avoids authentication failures caused by routing changes or WAN-address transitions.

/radius
add address=10.255.20.10 \
    service=ppp,hotspot,login \
    secret="Replace-With-A-Unique-Long-Secret" \
    src-address=10.255.255.1 \
    timeout=1s \
    comment="Primary RADIUS"

add address=10.255.20.11 \
    service=ppp,hotspot,login \
    secret="Replace-With-A-Different-Long-Secret" \
    src-address=10.255.255.1 \
    timeout=1s \
    comment="Secondary RADIUS"

Replace the example addresses with your actual RADIUS server and router source addresses. Confirm that firewall policy permits the router to reach both RADIUS servers on UDP 1812 and UDP 1813.

Common issue: A shared-secret mismatch frequently appears as a timeout rather than a clear rejection. Always review both the RouterOS log and the RADIUS server log when testing a new client entry.

Takeaway: Configure primary and secondary RADIUS servers, set a predictable source address, use unique secrets, and validate reachability before directing production services to RADIUS.

4. Enable AAA Separately for PPPoE, Hotspot, and Router Login

Adding a RADIUS server under /radius does not automatically enable every RouterOS service to use it. PPP, Hotspot, and router user login each have their own RADIUS settings and should be enabled and tested individually.

PPP and PPPoE

For PPP and PPPoE subscriber authentication, enable RADIUS under /ppp aaa. Accounting and interim updates should be selected based on reporting and operational requirements.

/ppp aaa
set use-radius=yes \
    accounting=yes \
    interim-update=15m

RouterOS checks the local PPP secret database first. If a matching local secret exists, it can take precedence over RADIUS. Avoid duplicate usernames unless that behavior is intentional and documented.

Hotspot

Hotspot RADIUS authentication is enabled through the Hotspot profile. Test valid and invalid login attempts, captive-portal behavior, accounting records, redirects, voucher handling, and any service-package or time-limit policy returned by the RADIUS platform.

/ip hotspot profile
set [find name="default"] use-radius=yes

RouterOS Administrative Login

Router administrative access can also use RADIUS for SSH, WinBox, WebFig, and API authentication. Before enabling it, create and protect a local break-glass administrator account. That account should have a strong password, be stored securely, and remain available if the RADIUS platform or a WAN path fails.

/user aaa
set use-radius=yes \
    accounting=yes \
    interim-update=15m \
    default-group=read

Start with a restrictive default group such as read. Grant elevated access only through intentional RADIUS group mapping and RouterOS user-group policy design.

Takeaway: Enable and validate one service at a time. Never enable RADIUS for router administration without first confirming a tested local break-glass account.

5. Map Policy Through RADIUS Attributes

RADIUS provides the most value when it returns policy rather than only approving or rejecting credentials. RouterOS can apply attributes returned in an Access-Accept message, centralizing provisioning across many routers.

Attribute or PolicyTypical Use
Framed-IP-AddressAssign a specific IPv4 address to a session.
Framed-PoolAssign an address from a named pool.
Mikrotik-Rate-LimitApply subscriber bandwidth policy and queue settings.
Mikrotik-GroupSelect a RouterOS user group, PPP profile, or Hotspot profile.
Session-TimeoutDefine maximum session duration.
Idle-TimeoutDisconnect inactive sessions according to policy.
VLAN or service policyApply service segmentation where supported by the access design.

The MikroTik vendor-specific attribute Mikrotik-Rate-Limit can define rate, burst, threshold, burst time, priority, and minimum-rate behavior. Validate queue behavior on the exact RouterOS release and hardware model used in production. Subscriber rate limiting can affect CPU use, queue design, and forwarding performance.

Build an attribute test matrix that records the attribute name, intended function, expected RouterOS result, RADIUS dictionary source, RouterOS version, hardware model, and validation result.

Takeaway: Treat RADIUS attributes as configuration code. Test them under realistic traffic and document exactly what each attribute changes on RouterOS.

6. Implement Accounting and Centralized Logging

Accounting turns authentication into an operational record. RADIUS accounting commonly uses Accounting-Start, Interim-Update, and Accounting-Stop messages to track session state, duration, and usage.

Start and Stop messages confirm when a session begins and ends. Interim updates determine how quickly the accounting platform receives current session information. Shorter intervals provide more timely visibility but generate additional RADIUS and database activity.

  • Enable accounting for every session-based service that requires reporting.
  • Confirm that Start and Stop records pair correctly for test sessions.
  • Review how the RADIUS platform handles an unclean disconnect or missing Stop record.
  • Use interim updates appropriate for subscriber counts and reporting requirements.
  • Log RouterOS authentication failures locally and forward them to central logging.
  • Monitor RADIUS response time, timeout volume, rejection volume, and accounting record volume.
  • Protect accounting data because it can contain subscriber identities, usage data, addresses, and session history.

Takeaway: Verify accounting records as carefully as authentication. A successful login without reliable Start, Interim, and Stop records creates blind spots in troubleshooting, billing, auditing, and capacity planning.

A successful login is only the first check. Accounting records must remain useful through failures and recovery
Verify Start, Interim, and Stop records for test sessions. Include unclean disconnects, server failover, and documented outage behavior in acceptance testing. Select the illustration for a larger view.

7. Test, Validate, and Monitor the Complete Deployment

A RADIUS configuration is not finished when a single login works. It must be tested across services, user types, policy returns, failure scenarios, and expected load conditions.

Recommended test matrix:
  • Successful and failed PPPoE authentication.
  • Successful and failed Hotspot authentication.
  • Successful and failed RouterOS administrative login.
  • Correct application of IP, pool, rate-limit, profile, VLAN, and timeout attributes.
  • Accounting Start, Interim, and Stop record validation.
  • Primary RADIUS failure and secondary-server recovery.
  • Complete RADIUS outage behavior compared with the documented fallback policy.
  • Mass reconnect testing after a simulated access-network outage.
  • Router CPU, memory, queue, and authentication response-time checks during load.
  • Post-upgrade validation after RouterOS, RADIUS, database, or hardware changes.

Record results alongside the RouterOS version, router model, RADIUS software version, configuration revision, and test date. That record makes later troubleshooting and change management substantially easier.

Operational warning: Sustained RADIUS timeout rates usually point to routing, firewall, shared-secret, server-performance, DNS, or packet-loss issues. Alert before authentication delays become a subscriber-impacting outage.

Frequently Asked Questions

Can MikroTik use RADIUS for PPPoE, Hotspot, and administrative login at the same time?

Yes. RouterOS supports RADIUS services for PPP, Hotspot, and login. Each service must be explicitly enabled and tested. A single RADIUS platform can centralize identities and policy for all three, while separate service rules and attributes can still be applied.

Should local RouterOS users be removed after enabling RADIUS?

No. Maintain at least one secure local break-glass administrator account for every router. This prevents a RADIUS outage, WAN failure, or RADIUS policy error from locking administrators out of the device.

Can RADIUS set subscriber bandwidth limits?

Yes. The Mikrotik-Rate-Limit attribute can return a RouterOS rate-limit policy. Test the result carefully because queue behavior and throughput depend on the RouterOS version, service design, hardware capacity, and existing queue configuration.

Why do RADIUS users time out even when the server is online?

Common causes include a mismatched shared secret, firewall rules blocking UDP 1812 or UDP 1813, incorrect source-address selection, asymmetric routing, a failed secondary path, overloaded RADIUS infrastructure, or an incorrect NAS client definition on the RADIUS server.

The Bottom Line

MikroTik RADIUS integration gives network operators a scalable way to centralize authentication, service policy, permissions, and accounting. The most successful deployments begin with architecture and redundancy planning, then validate every service and failure condition before production rollout.

Done properly, RADIUS reduces configuration drift, speeds provisioning, improves accountability, and provides a stronger operational foundation for subscriber networks, Hotspot environments, and RouterOS administration.

References

Need help with MikroTik RADIUS and AAA design?

Link Technologies, Inc. provides MikroTik RADIUS integration, PPPoE design, Hotspot configuration, subscriber-management planning, RouterOS security reviews, and network monitoring services.

Contact Our Team Explore Our Services
Link Technologies, Inc.
IT Infrastructure • Wireless • Fiber • Hosting • Cloud Services
shop.linktechs.net • sales@linktechs.net • 314-735-0270

Leave your comment

*
Only registered users can leave comments.