Supported RouterOS Versions
| Version | API Method | Notes |
|---|---|---|
| RouterOS 7.1+ | REST API (HTTP/HTTPS) | Recommended. Full feature support. |
| RouterOS 6.x | REST API via www service | Requires /ip service set www enabled. |
RouterOS 7.x is recommended for all new deployments. FyberPay uses the
/rest/ endpoint prefix for all API calls, which requires the www or www-ssl service to be enabled on the router.Architecture Overview
Connection Setup
Register the NAS device
In the FyberPay admin dashboard, navigate to Network > NAS Devices and add a new device. Provide:
- Device name: a human-readable label (e.g. “Westlands-POP-1”)
- IP address: the router’s WAN IP (used for RADIUS NAS registration)
- RADIUS secret: shared secret for RADIUS authentication
- CoA port: default is
3799
Run the bootstrap script
FyberPay generates a RouterOS provisioning script for each device. Copy and paste it into the router’s terminal. The script handles:
- SSTP tunnel creation with a dedicated PPP profile (
fyberpay-tunnel) - RADIUS client configuration (authentication port 1812, accounting port 1813)
- REST API user creation with scoped permissions
- Firewall rules to allow tunnel traffic
Configure the REST API user
The bootstrap script creates an API user with a custom group called Policies explicitly denied:
fyberpay-api. This group has the following policies:ftp, reboot, policy, test, password, sniff, sensitive, romon.The REST API service is restricted to the tunnel subnet:API Port Configuration
| Port | Protocol | Use Case |
|---|---|---|
| 80 | HTTP | Default REST API port over SSTP tunnel |
| 443 | HTTPS | REST API with TLS (self-signed certs accepted) |
| 8728 | API | Legacy MikroTik API protocol (RouterOS 6.x) |
| 8729 | API-SSL | Legacy API with TLS |
What FyberPay Reads from the Router
FyberPay polls the following data from each connected router:System Resources
System Resources
Endpoint:
GET /rest/system/resourceRetrieves CPU load, memory usage (total/free), uptime, RouterOS version, board name, and architecture. Displayed on the fleet dashboard.Active PPP Sessions
Active PPP Sessions
Endpoint:
GET /rest/ppp/activeLists all active PPPoE/PPTP/L2TP sessions with username, service type, caller ID, assigned IP, uptime, and encoding. Used for subscriber session monitoring.Network Interfaces
Network Interfaces
Endpoint:
GET /rest/interfaceReturns all interfaces with name, type, running/disabled status, TX/RX byte counters, packet counts, link-down count, and MTU.DHCP Leases
DHCP Leases
Endpoint:
GET /rest/ip/dhcp-server/leaseLists active DHCP leases with IP address, MAC address, hostname, status, and expiry time.Simple Queues
Simple Queues
Endpoint:
GET /rest/queue/simpleReads all simple queues with name, target address, max-limit, and burst-limit. Used for bandwidth plan enforcement visibility.PPPoE Servers
PPPoE Servers
Endpoint:
GET /rest/interface/pppoe-server/serverLists configured PPPoE server instances with service name, bound interface, and disabled state.What FyberPay Writes to the Router
PPPoE Server Setup
PPPoE Server Setup
FyberPay can auto-detect the best interface for PPPoE (preferring bridges, then the busiest Ethernet port) and create a PPPoE server:Existing FyberPay PPPoE servers are removed before creating new ones (idempotent operation).
Simple Queue Updates
Simple Queue Updates
Endpoint:
PATCH /rest/queue/simple/{id}Modify max-limit, burst-limit, and target on existing queues. Used when an ISP manages bandwidth through queues rather than RADIUS attributes.Firewall Address Lists
Firewall Address Lists
Add entry:
PUT /rest/ip/firewall/address-list
Remove entry: DELETE /rest/ip/firewall/address-list/{id}Used for walled garden enforcement, IP blocking, and access control. Each entry includes the list name, IP address, and an optional comment.Device Reboot
Device Reboot
Endpoint:
POST /rest/system/rebootTriggers a remote reboot. Requires admin or super_admin role. All reboot actions are recorded in the audit log.Fleet Monitoring
FyberPay polls all configured NAS devices in parallel (batches of 10) to build the fleet status dashboard. Each device reports:- Reachability (online/offline)
- Board name and RouterOS version
- CPU load percentage
- Memory usage percentage
- System uptime
- Active PPP session count
RADIUS Configuration
The bootstrap script configures each router as a RADIUS client pointing to FyberPay’s FreeRADIUS server:Troubleshooting
Router shows as unreachable
Router shows as unreachable
- Verify the SSTP tunnel is established: check
/interface sstp-client printon the router - Confirm the tunnel has an IP in the 10.99.x.x range:
/ip address print where interface=fyberpay-tunnel - Ensure the
wwwservice is enabled and bound to the tunnel subnet:/ip service print - Check that the firewall allows tunnel traffic:
/ip firewall filter print where comment~"FyberPay"
API credentials not configured error
API credentials not configured error
The NAS device record in FyberPay is missing the RouterOS API username or password. Re-run the bootstrap script or manually update the device credentials in Settings > Network > NAS Devices.
SSTP tunnel keeps disconnecting
SSTP tunnel keeps disconnecting
- Confirm the tunnel uses
profile=fyberpay-tunnel(notprofile=default) - Check that
verify-server-certificate=nois set (FyberPay uses self-signed certs for the SSTP server) - Verify the router has stable internet connectivity:
/ping 8.8.8.8 count=5 - Review tunnel logs:
/log print where topics~"sstp"
REST API returns 401 Unauthorized
REST API returns 401 Unauthorized
Circuit breaker is open
Circuit breaker is open
FyberPay wraps all RouterOS API calls in a circuit breaker. If a router is consistently unreachable (multiple consecutive failures), the circuit breaker opens and stops sending requests for a cooldown period. The device will show as unreachable until the circuit closes and the next health check succeeds.
Security Considerations
- All API traffic flows through the encrypted SSTP tunnel. No RouterOS API ports are exposed on public interfaces.
- API credentials are encrypted at rest using AES-256 (the platform
ENCRYPTION_KEY). - The
fyberpay-apiuser group has minimal permissions: no access topolicy,password,sensitive, orsniffoperations. - Every write operation (reboot, queue change, address list modification) is recorded in FyberPay’s audit log with the acting user, timestamp, and IP address.