Skip to content

RADIUS Client

RouterOS acts as a RADIUS client, forwarding authentication and accounting requests to one or more external RADIUS servers. A single /radius entry can serve multiple services simultaneously — PPP tunnels (L2TP, PPPoE, PPTP, OVPN, SSTP), HotSpot captive portal, router login (login), wireless 802.1X, and DHCP. When RADIUS is enabled for a service, RouterOS checks the local user database first; if no local match exists, the request is forwarded to the configured RADIUS servers in order.

MenuPurpose
/radiusAdd/manage RADIUS server entries
/radius incomingAccept unsolicited CoA/DM messages from RADIUS server
/ppp aaaEnable RADIUS for all PPP services
/ip hotspot aaaEnable RADIUS for HotSpot
/user aaaEnable RADIUS for router login

Each entry in /radius represents one RADIUS server. Add one or more servers and assign services to each.

/radius add \
address=10.0.0.10 \
secret=MySecret123 \
service=ppp,hotspot,login \
timeout=300ms

Multiple services can be listed as a comma-separated value. When more than one entry shares a service, RouterOS tries them in configured order and moves to the next on timeout.

PropertyTypeDefaultDescription
addressIP addressRADIUS server IP address
secretstringShared secret for HMAC-MD5 message signing
serviceflag listServices using this server: hotspot, dhcp, ppp, pptp, pppoe, l2tp, ovpn, sstp, login, wireless, dhcpv6, dot1x
portinteger1812Authentication port
accounting-portinteger1813Accounting port (use 1646/1647 for legacy servers)
timeouttime300msResponse wait time before trying next server
src-addressIP addressSource IP for RADIUS packets (useful on multi-homed routers)
realmstringRealm appended to username in Access-Request
called-idstringCalled-Station-ID attribute value (HotSpot primarily)
domainstringDomain for request routing
vrfnamemainVRF for outbound RADIUS traffic
encryptionyes | noyesInclude Message-Authenticator for integrity verification
accounting-backupyes | noyesSend accounting to this server when primary fails
disabledyes | nonoDisable this server entry
commentstringAdministrative note

RADIUS must be enabled per-service. Each service has its own AAA submenu.

Applies to all PPP services: L2TP, PPPoE, PPTP, OVPN, SSTP, async.

/ppp aaa set use-radius=yes accounting=yes interim-update=5m
PropertyDefaultDescription
use-radiusnoForward authentication to RADIUS when user not found locally
accountingyesSend Accounting-Start/Stop/Interim-Update packets
interim-update0sInterval for Acct-Interim-Update (0 = disabled). Set >0 for live session billing
enable-ipv6-accountingnoTrack IPv6 prefix traffic separately in accounting records

Applies to the HotSpot captive portal login service.

/ip hotspot aaa set use-radius=yes accounting=yes interim-update=5m
PropertyDescription
use-radiusForward HotSpot logins to RADIUS
accountingEnable HotSpot accounting packets
interim-updateAccounting update interval

Applies to administrator logins via Winbox, SSH, Telnet, and the web interface.

/user aaa set use-radius=yes accounting=yes
PropertyDefaultDescription
use-radiusnoTry RADIUS if local username not found
accountingyesSend accounting for admin sessions
exclude-groupsLocal groups exempt from RADIUS lookup

:::tip Local fallback For all services, local users always take precedence. If a username exists locally, RADIUS is never contacted. If RADIUS is unreachable, local users with matching credentials still authenticate normally. :::

Incoming RADIUS Messages (CoA / Disconnect)

Section titled “Incoming RADIUS Messages (CoA / Disconnect)”

RADIUS servers can send unsolicited Change-of-Authorization (CoA) or Disconnect-Messages (DM) to modify or terminate active sessions. RouterOS listens on /radius incoming.

/radius incoming set accept=yes port=1700
PropertyDefaultDescription
acceptnoEnable processing of incoming CoA/DM packets
port1700UDP port to listen on
vrfmainVRF for the listener
AttributeDescription
User-NameUsername
User-Password / MS-CHAPCredentials (protocol-dependent)
NAS-IdentifierRouter identity (/system identity)
NAS-IP-AddressRouter source IP
NAS-PortPort or interface index
NAS-Port-TypeEthernet, Virtual, Wireless, etc.
Service-TypeFramed (PPP), Login (router login), HotSpot
Framed-ProtocolPPP
Acct-Session-IdUnique session ID
Called-Station-IdValue from called-id property
AttributeEffect
Framed-IP-AddressAssigns IP to the client
Framed-PoolPicks IP from named local pool
Framed-RouteAdds static route when session starts
MikroTik-Rate-LimitApplies queue rate limit (format: rx/tx e.g. 10M/20M)
Session-TimeoutMaximum session length
Idle-TimeoutDisconnect after idle period
Filter-IdFirewall chain to apply
Reply-MessageMessage shown to user (HotSpot)
AttributeDescription
Acct-Status-TypeStart, Stop, or Interim-Update
Acct-Session-IdMatches the Access-Request session ID
Acct-Input-OctetsBytes received by router
Acct-Output-OctetsBytes sent by router
Acct-Input-PacketsPackets received
Acct-Output-PacketsPackets sent
Acct-Session-TimeSession duration in seconds
Acct-Terminate-CauseReason for disconnection
# 1. Add RADIUS server for PPP services
/radius add address=192.168.1.100 secret=pppSecret service=ppp,pptp,pppoe,l2tp,ovpn,sstp
# 2. Enable RADIUS AAA for PPP
/ppp aaa set use-radius=yes accounting=yes interim-update=5m
# 3. Configure L2TP server
/interface l2tp-server server set enabled=yes default-profile=default
# 4. Verify active sessions
/ppp active print
# 1. Add RADIUS server for HotSpot
/radius add address=192.168.1.100 secret=hsSecret service=hotspot
# 2. Enable RADIUS AAA
/ip hotspot aaa set use-radius=yes accounting=yes interim-update=10m
# 3. Confirm HotSpot is running
/ip hotspot print
/ip hotspot active print

Router Login via RADIUS (with Local Fallback)

Section titled “Router Login via RADIUS (with Local Fallback)”
# 1. Add RADIUS server for login
/radius add address=192.168.1.100 secret=loginSecret service=login
# 2. Enable RADIUS for admin login
/user aaa set use-radius=yes accounting=yes
# Keep at least one local admin user for fallback:
/user print

:::warning Keep a local admin account If the RADIUS server becomes unreachable and no local admin account exists, you will be locked out. Always maintain a local user with group=full as a recovery path. :::

# Primary server
/radius add address=10.0.0.10 secret=sharedSecret service=ppp,hotspot,login timeout=300ms
# Secondary server (tried if primary times out)
/radius add address=10.0.0.11 secret=sharedSecret service=ppp,hotspot,login timeout=300ms
# Allow RADIUS server to terminate sessions remotely
/radius incoming set accept=yes port=1700
# Allow inbound CoA/DM from RADIUS server in firewall
/ip firewall filter add chain=input protocol=udp dst-port=1700 \
src-address=192.168.1.100 action=accept comment="RADIUS CoA/DM" place-before=0
# View configured RADIUS servers and their state
/radius print detail
# Check PPP AAA settings
/ppp aaa print
# Check HotSpot AAA settings
/ip hotspot aaa print
# Check router login AAA settings
/user aaa print
# View active PPP sessions
/ppp active print
# View active HotSpot sessions
/ip hotspot active print
# Tail RADIUS-related log entries
/log print follow where message~"radius"
  1. Verify connectivity to the RADIUS server:

    /ping 192.168.1.100
  2. Check shared secret — it must match exactly on both sides:

    /radius print detail
  3. Confirm service flag — the /radius entry must list the relevant service:

    /radius set 0 service=ppp,hotspot,login
  4. Check firewall — RADIUS traffic (UDP 1812/1813) must be allowed outbound:

    /ip firewall filter print
  5. Enable RADIUS logging for detailed packet traces:

    /system logging add topics=radius action=memory
    /log print follow where topics~"radius"
  • Ensure interim-update is set to a value greater than 0s:
    /ppp aaa set interim-update=5m
  • Verify the RADIUS server accepts accounting packets (port 1813 by default).

Users Not Receiving IP Address from RADIUS

Section titled “Users Not Receiving IP Address from RADIUS”
  • Confirm the RADIUS server returns Framed-IP-Address or Framed-Pool in Access-Accept.
  • Check that the named pool exists on the router if using Framed-Pool:
    /ip pool print
  • The MikroTik-Rate-Limit attribute must use the format rx-rate/tx-rate (e.g., 10M/20M).
  • Verify with /queue simple print or /queue tree print after a user connects.