Skip to content

Sharing Detection

Sharing Detection is ProxPanel’s defence against the single most common form of revenue loss in residential ISP networks: one subscriber paying for an account and lending it (or selling it) to neighbours. The system uses TTL fingerprinting plus connection-count thresholds to identify subscribers whose traffic profile is inconsistent with a single household.

Detection runs on schedule (default 2 AM) or on demand. It is non-disruptive — by default it only flags suspect accounts. Optionally, the system can auto-disconnect or downgrade subscribers above a configured suspicion threshold; you decide how aggressive to be.

  • SidebarSharing Detection (people icon).
  • Direct URL: /sharing.

Requires sharing.view. Admins and resellers with the permission see results scoped to their subscribers.

SectionPurpose
Settings panel (top)Schedule, thresholds, auto-action, save.
Last scan summaryWhen it ran, how many subscribers checked, how many flagged.
Results tablePer-flagged subscriber: TTL signature, connection count, suspicion level, recommended action.
Manual scan buttonRun a scan now for one subscriber, one NAS, or the whole system.

Every IP packet carries a TTL (Time-To-Live) value. Operating systems start with characteristic defaults:

OSInitial TTL
Windows128
Linux / Android / iOS / macOS64
Some FreeBSD variants64
Old / embedded255

Each router along the path decrements TTL by 1. So a packet leaving the customer’s PC and reaching your BNG carries initial_TTL − (hops − 1). For a typical home — PC → router → BNG — you’d see 127 (Windows) or 63 (Linux).

The detector reads observed TTL values for each subscriber from the MikroTik /ip/firewall/mangle connection table (added by an auto-installed mangle rule that marks the highest TTL it sees per connection). It then analyses the distribution:

PatternWhat it means
All TTLs come from one expected value (63 or 127)Normal — one OS, behind one router.
Mix of 63 and 127Multiple OS — household with both Windows and Linux/Android. Could be legit family use, mild suspicion.
TTLs at expected − 1 (62, 126)Router detected behind router — the subscriber has a second NAT hop. Common in shared-account abuse.
Many different lowered TTLsDouble router + multiple OS — strong indication of multi-household sharing.

Combined with raw connection count — measured per subscriber from /ip/firewall/connection on the MikroTik — the detector assigns a suspicion level.

LevelThresholds (defaults)Meaning
normalSingle OS, single hop, < 300 connectionsNo action.
lowMultiple OS or 300+ connectionsPossibly a heavy household. Watch list.
mediumRouter-decremented TTL or 500+ connectionsLikely sharing. Flag for review.
highDouble-router pattern or 800+ connectionsAlmost certainly sharing. Auto-action threshold.
criticalBoth router-decrement AND 800+ connectionsDefinite.

Thresholds (ConnectionThresholdLow=300, Medium=500, High=800) live in the handler and are configurable in the settings panel.

SettingStored asDefault
Automatic scanningsharing_detection_enabledoff
Schedule (cron)sharing_detection_schedule0 2 * * * (2 AM daily)
TTL threshold for router detectionsharing_detection_ttl_threshold2 (any TTL ≤ expected-2)
Auto-disconnectsharing_detection_auto_disconnectoff
Auto-disconnect minimum levelembeddedhigh
Notify operator on flagembeddedon (via Communication Rules)

The cron expression accepts any standard 5-field cron — 0 2 * * * for nightly, */30 * * * * for every half-hour (intense; use only during forensics).

Click Scan Now in the top toolbar. You can:

  • Scan one subscriber — pick from the autocomplete; the TTL marks are queried in real time. ~3 seconds.
  • Scan one NAS — every online subscriber on that NAS. Useful when you’re investigating one MikroTik. 10–30 seconds depending on session count.
  • Scan everything — every online subscriber across every NAS. This is the same path the nightly scheduler takes. Can take several minutes on a 30,000-sub panel; uses parallel queries with a per-NAS timeout cap of 5 seconds plus a 10-second overall budget per NAS.

Results refresh inline as they’re computed. The previous run’s results are preserved until you click Clear Results.

  1. A row is upserted into sharing_detection_results keyed by subscriber.
  2. The audit log records the flag with the operator (or “system” for scheduled scans).
  3. If Communication Rules include a sharing_flagged event, you receive a notification.
  4. If sharing_detection_auto_disconnect is on AND the level meets the configured minimum, the subscriber is disconnected via CoA. Their is_online flag is cleared. The audit log records the disconnect.

The subscriber row itself is not touched — no permanent change is made. The flag is informational unless auto-action is enabled.

The results table shows, per flagged subscriber:

ColumnNotes
SubscriberUsername, full name, reseller.
ConnectionsLive count from MikroTik at scan time.
TTL valuesList of distinct TTLs seen.
TTL statusnormal, router_detected, multiple_os, double_router.
Suspicion levelComputed from the above.
ReasonsFree-text bullet list explaining the verdict.
ActionsDisconnect now, ignore (whitelist), open subscriber.

Whitelisting a subscriber suppresses future flags — useful for the IT guy in your building who really does run three OSes and a VPN.

Set up nightly scanning for the first time

Section titled “Set up nightly scanning for the first time”
  1. Open Sharing DetectionSettings.
  2. Tick Enable automatic scanning. Leave schedule at 0 2 * * *.
  3. Leave Auto-disconnect off for the initial soak.
  4. Save. Check back tomorrow morning to see the first set of results.
  1. Scan Now → pick “One subscriber” → enter username.
  2. Wait ~3 seconds for the result.
  3. If level is high or critical, take a screenshot for the customer file before any action.
  4. Click Disconnect now, or hand the case off to your retention team for a polite call.

Turn on auto-disconnect after a soak period

Section titled “Turn on auto-disconnect after a soak period”
  1. Review two weeks of flagged results. Whitelist any false positives.
  2. Tighten or loosen the thresholds based on what you saw.
  3. Tick Auto-disconnect, set minimum level = high.
  4. Save. From now on, every scan that flags high or critical will issue a CoA disconnect.
PermissionWhat it gates
sharing.viewOpen the page and see results.
sharing.scanRun manual scans.
sharing.editChange settings, enable auto-disconnect.
sharing.whitelistMark a subscriber as exempt.
  • Subscribers — drilling into a flagged subscriber.
  • Sessions — see live PPPoE sessions and disconnect manually.
  • NAS / Routers — the source of TTL marks; sharing detection only works on MikroTik NAS for now.
  • Communication Rulessharing_flagged event notifications.
  • Audit Logs — every flag, whitelist, and auto-disconnect is logged.