Skip to main content

How to Automate MikroTik PPPoE Suspension on Payment

26 October 2026 · 7 min read

Suspending and reconnecting PPPoE subscribers by hand in Winbox does not scale past a few dozen customers. This guide shows the three building blocks that make it automatic: RADIUS authentication, a walled-garden address list, and a disconnect packet that ends the live session.

The three moving parts

A reliable automated suspension has to do three things, in order:

  • Decide: the billing system marks the account as unpaid or paid
  • Enforce: the router stops giving full access to unpaid accounts
  • Kick the live session: an already-connected PPPoE session keeps working until it is ended, so the router must be told to drop it

Skipping the third step is the most common reason a suspended customer is still online hours later.

Step 1: authenticate PPPoE against RADIUS

Point the PPP service at your RADIUS server instead of local secrets:

/radius add service=ppp address=10.10.0.5 secret=CHANGE_ME authentication-port=1812 accounting-port=1813
/ppp aaa set use-radius=yes accounting=yes interim-update=5m

With RADIUS in charge, the billing system controls the reply for every login: accept with a rate limit for paid accounts, or accept into a restricted pool, or reject.

Step 2: choose how to enforce suspension

There are two common patterns:

  • Reject the login: simplest, but the customer sees a failed dial-in and cannot reach your payment page
  • Accept into a walled garden: the account is accepted, placed in an address list such as expired, and a firewall rule redirects or limits traffic so they can only reach the payment portal

Walled garden is friendlier because the customer sees why they are blocked and can pay immediately. The RADIUS reply for an expired account sets the address list and a low rate limit using the MikroTik vendor attributes (Mikrotik-Address-List and Mikrotik-Rate-Limit).

Step 3: end the live session with a disconnect

When an account flips from paid to unpaid, the router still holds the old session. Send a RADIUS Disconnect-Request so the customer re-authenticates and lands in the walled garden. See our guide on sending a CoA packet for the exact commands.

Step 4: reconnect on payment

When M-Pesa confirms a payment large enough to clear the balance, the billing system flips the account to active and sends another disconnect. The customer's router redials, RADIUS now returns the full plan, and service is back in seconds with no staff involved.

Pitfalls to avoid

  • Partial payments: only reconnect when the paid amount clears the outstanding balance
  • Router clock drift: expiry timestamps and accounting data depend on correct time, so use NTP
  • No interim updates: without accounting interim updates the billing system cannot see who is currently online

Skip the plumbing

Metron ISP automates the enforcement side for you: after a configurable grace period it disables the PPPoE account and ends the session through the RouterOS API, and it re-enables the account when an M-Pesa payment is matched. See RADIUS and MikroTik billing or start a free trial.