Configure MikroTik RouterOS v7 RADIUS for PPPoE and hotspot
Step-by-step RouterOS v7 RADIUS client configuration for PPPoE and hotspot, incoming CoA on port 3799, firewall rules and verification commands.
This guide configures a MikroTik router running RouterOS v7 as a RADIUS client so that PPPoE and hotspot users are authenticated, accounted and controlled by a central RADIUS server. Use it if your routers authenticate through RADIUS; routers where Metron manages PPPoE secrets directly do not need it.
What you need before you start#
- RouterOS v7 on the router, with a working PPPoE server or hotspot
- The RADIUS server IP address, shared secret and ports (authentication 1812, accounting 1813)
- UDP reachability from the router to the server, and from the server back to the router on 3799 for disconnects
- Correct time on the router, using NTP
Step 1: set the router clock#
Accounting records and expiry times depend on accurate time:
/system ntp client set enabled=yes
/system ntp client servers add address=pool.ntp.org
/system clock set time-zone-name=Africa/NairobiStep 2: add the RADIUS server#
/radius add service=ppp,hotspot address=10.10.0.5 secret=CHANGE_ME authentication-port=1812 accounting-port=1813 timeout=3sUse a long random secret and keep the same value in the RADIUS server's client entry for this router. If the router reaches the server through a tunnel or has several addresses, set src-address so the server sees the address it expects.
Step 3: enable RADIUS for PPPoE#
/ppp aaa set use-radius=yes accounting=yes interim-update=5mInterim updates let the billing system see which subscribers are online and how much data they have used. Make sure the PPP profile no longer depends on local secrets. Do not run local secrets and RADIUS for the same users, because the local secret can override what RADIUS decides.
Step 4: enable RADIUS for hotspot#
/ip hotspot profile set [find name=default] use-radius=yesReplace default with your hotspot profile name. Hotspot users then log in through the captive portal and are checked against RADIUS.
Step 5: accept disconnects and changes from the server#
Without this step, the server cannot end a live session when a customer's account expires or when they pay:
/radius incoming set accept=yes port=3799Step 6: open the firewall#
Allow these packets between the router and the RADIUS server:
- UDP 1812 router to server (authentication)
- UDP 1813 router to server (accounting)
- UDP 3799 server to router (disconnect and change of authorization)
Step 7: verify#
/radius print
/ppp active print
/log print where topics~"radius"A new PPPoE login should appear in the active list with the rate limit sent by RADIUS. Rejected logins and shared-secret mismatches show in the log.
Troubleshooting#
Why does every login fail with a timeout?#
The router cannot reach the server on UDP 1812, or the server does not have this router as a client. Check routing, firewall rules and the client list on the server.
Why do logins work but suspended users stay online?#
The router is not accepting incoming RADIUS packets. Confirm /radius incoming is enabled on port 3799 and that UDP 3799 is open from the server.
Why is the shared secret rejected?#
The secret on the router and the server must match exactly, including case and special characters. Re-enter both.
Using this with Metron ISP#
Metron ISP controls MikroTik routers directly over the RouterOS API and also supports routers that authenticate through a RADIUS server, where it can change a live subscriber speed with a CoA request. See RADIUS and MikroTik billing and the guide to sending a CoA packet.