Skip to content

Sessions

The Sessions page shows the live RADIUS accounting table — every PPPoE session currently terminated on your BNGs, plus historical sessions. Data comes directly from the radacct PostgreSQL table; the page does not cache and reflects the latest accounting interim updates within seconds.

This is the page to open when a customer says “I’m disconnected” or “Why is my IP X?”. Combined with Subscribers it answers most “where is this user right now” questions.

Sidebar → Sessions. Direct URL: /sessions.

Requires sessions.view. Resellers see only sessions belonging to their subscribers (and sub-resellers’ subscribers) unless they have sessions.view_all, in which case they see the global list.

SectionWhat it shows
Stat rowTotal active sessions, sessions per NAS (mini-pills)
Filter barSearch box, Status dropdown (Online/Offline), NAS dropdown
Session tableUsername, Full name, Service, NAS, Framed IP, MAC (calling-station-id), Start time, Duration, Down/Up bytes, Action
Export CSV buttonTop right
PaginationServer-side, max 1000 rows per page
ColumnSourceNotes
Usernameradacct.usernameIncludes realm (e.g. john@example.com). Click to open Subscriber Detail.
Full Namesubscribers.full_name via LEFT JOINEmpty if the session has no matching subscriber row (orphaned session).
Serviceservices.name via JOINEmpty for orphaned sessions.
NASnas_devices.name (joined on radacct.nasipaddress = nas_devices.ip_address)Falls back to the IP if no NAS row matches.
Framed IPradacct.framedipaddressThe PPPoE-assigned IP.
MACradacct.callingstationidThe customer’s CPE MAC.
Acct Session IDradacct.acctsessionidMikroTik’s session identifier, used in CoA.
Startradacct.acctstarttimeWhen the session began.
Durationradacct.acctsessiontimeSeconds since start.
Download / Uploadradacct.acctoutputoctets / acctinputoctetsBytes since session start, accumulated from interim updates.
StatusDerivedonline if acctstoptime IS NULL, otherwise offline.
ValueSQL condition
Online (default)acctstoptime IS NULL
Offlineacctstoptime IS NOT NULL

Dropdown is populated from nas_devices. Selecting one applies WHERE nasipaddress = ?.

The search field does case-insensitive ILIKE %query% across:

  • radacct.username
  • radacct.framedipaddress
  • radacct.callingstationid (MAC)

This is enough to find a session by partial username, IP, or MAC.

Each row has a Disconnect button. The handler does two things, in order:

  1. MikroTik API — Connects to the NAS at radacct.nasipaddress and calls /ppp active remove for the user. This is the most reliable path because it bypasses RADIUS entirely.
  2. CoA Disconnect — If the API call fails or isn’t available, sends a Disconnect-Request to the NAS at the CoA port. RouterOS responds with Disconnect-ACK and tears down the session.

Both methods immediately close the PPPoE link. RouterOS sends an Accounting-Stop, the row’s acctstoptime populates, the session moves to “Offline”.

The UI shows a toast with the result. If neither path worked, you’ll see “Disconnect failed” — the most common cause is the NAS being unreachable.

There is also a Disconnect All action that loops through every session for a specific username (when a customer has multiple concurrent sessions, e.g. test devices left logged in).

If a NAS reboots or the WAN link drops mid-session, MikroTik may never send the Accounting-Stop. The session sits “open” in radacct forever and the user appears online when they’re not.

ProxPanel runs the Stale Session Cleanup service every 5 minutes:

  1. Find sessions with no acctupdatetime in the last 30 minutes.
  2. Set acctstoptime = acctupdatetime, acctterminatecause = 'Lost-Carrier'.
  3. Update the matching subscribers.is_online = false.

So a session might briefly show online here even though the NAS no longer thinks the user is connected — the sweeper closes it within 5 minutes. See the Dashboard “How Online is computed” section for the cross-reference.

Click Export CSV to download the current view (with filters applied) as a CSV file. The export includes every column on the table plus acct_stop_time, acct_terminate_cause, and acct_session_id.

Default export is the current page; switch to “Export All” in the modal to dump up to 100,000 rows. Larger than that, query the database directly.

For non-admin users (reseller / sub-reseller / support / collector / read-only), the page adds:

WHERE username IN (
SELECT username FROM subscribers
WHERE reseller_id IN (
SELECT id FROM resellers
WHERE id = ? OR parent_id = ?
)
)

unless they have sessions.view_all. The widened gate (covering Support, Collector, Read-only) was added in v1.0.549 — earlier versions only restricted user_type reseller, letting other reseller-tied user types see the global list.

  1. Search the username here.
  2. If the user appears with Status = Online, the PPPoE link is up — the issue is upstream of the NAS. Check service expiry and FUP tier on the Subscriber Detail page.
  3. If the user appears with Status = Offline, look at the last session’s acct_terminate_cause for a hint (Lost-Carrier, Idle-Timeout, Admin-Reset, NAS-Request).
  4. If the user doesn’t appear at all, they’ve never connected. Check radcheck for Auth-Type := Reject (deactivated) or wrong username on the CPE.

Mass-disconnect a region for emergency maintenance

Section titled “Mass-disconnect a region for emergency maintenance”
  1. Filter by the NAS serving that region.
  2. Filter Status = Online.
  3. Use the bulk-action approach from Subscribers — filter by NAS there, Select All, Disconnect. Loops through CoA per subscriber.
  4. Or, on the NAS itself: /ppp active remove [find] if you have direct console access.
  1. Search the IP in the search box.
  2. The session with Framed IP = X returns immediately. Username is right there.
PermissionEffect
sessions.viewPage loads.
sessions.view_allReseller sees global session list, not just their own subscribers’ sessions.
subscribers.disconnectEnables the per-row Disconnect button.
  • Subscribers — click any username here to jump to subscriber detail.
  • NAS / Routers — defines the NAS column join target.
  • Dashboard — the Active Sessions counter on the dashboard is COUNT(*) of the Online filter here.
  • Sharing Detection — TTL analysis of sessions to detect shared accounts.
  • Diagnostic Tools — Ping / Traceroute against the IP in a session row.