A complete production-ready web application for managing PPPoE subscribers in FreeRADIUS for MikroTik and Cisco access concentrators.
- Subscriber Management: Full CRUD for PPPoE users with username/password, static IP, service packages, expiration dates, and suspension
- Service Packages: Define reusable rate limit profiles for MikroTik and Cisco devices
- NAS Device Management: Manage RADIUS clients (MikroTik BRAS, Cisco BNG)
- Active Sessions: View real-time online sessions from accounting data
- Bulk Operations: CSV import/export for subscribers
- Role-Based Access: Admin and Operator roles with different permissions
- Audit Logging: Complete history of all system changes
- Dashboard: Statistics and quick actions
- Backend: PHP 8.3 + Laravel 11
- Database: MariaDB 11.2 with FreeRADIUS schema
- Web Server: Nginx
- RADIUS: FreeRADIUS 3.2.3 with MySQL/MariaDB backend
- Frontend: Blade templates + Bootstrap 5
- Containerization: Docker + Docker Compose
- Docker and Docker Compose installed on your system
- At least 2GB RAM
- Ports 80, 1812/udp, 1813/udp available
cd /path/to/gn-projectUsing Docker Compose:
docker-compose up -dOr using the Makefile:
make upThis will:
- Build and start all containers (database, PHP app, nginx, FreeRADIUS)
- Run database migrations automatically
- Seed the database with test data
- Generate application encryption key
The first startup takes a few minutes to:
- Build Docker images
- Install Composer dependencies
- Run migrations
- Seed database
Monitor the logs:
docker-compose logs -f appWait until you see:
Running seeders...
✓ Created admin user: admin
...
Seeding completed successfully!
Open your browser and navigate to:
http://localhost
Default Admin Credentials:
- Username:
admin - Password:
Admin123!
Default Operator Credentials:
- Username:
operator - Password:
Operator123!
For easier management, use these make commands:
make up # Start all containers
make down # Stop all containers
make restart # Restart all containers
make logs # View application logs
make migrate # Run database migrations
make seed # Run database seeders
make shell # Open bash shell in app container
make tinker # Open Laravel Tinker REPL
make clean # Stop containers and remove volumes (WARNING: deletes data)Edit .env to configure:
# Database
DB_HOST=db
DB_DATABASE=radius
DB_USERNAME=radius
DB_PASSWORD=radiuspass
# Admin credentials (for seeder)
ADMIN_USERNAME=admin
ADMIN_PASSWORD=Admin123!FreeRADIUS is configured to:
- Listen on UDP ports 1812 (auth) and 1813 (accounting)
- Use MySQL/MariaDB backend (rlm_sql_mysql)
- Read NAS clients from the
nastable - Support both MikroTik and Cisco attributes
Testing RADIUS authentication:
From your MikroTik/Cisco device, configure RADIUS server:
- IP:
<docker-host-ip> - Auth Port: 1812
- Accounting Port: 1813
- Secret:
radiusSecret1(MikroTik) orradiusSecret2(Cisco)
-
Create Subscriber:
- Go to Subscribers → Add Subscriber
- Enter username and password
- Optionally set static IP
- Assign a service package
- Set expiration date (optional)
- Configure simultaneous sessions allowed
-
Edit Subscriber:
- Click on subscriber → Edit
- All changes sync to RADIUS tables immediately
-
Reset Password:
- View subscriber → Reset Password button
- Only admins can reset passwords
-
Suspend/Activate:
- Toggle status to suspend or activate
- Suspended users get
Auth-Type := Rejectin RADIUS
-
Bulk Import:
- Go to Subscribers → Import CSV
- Use format:
username,password,static_ip,package,expiration,simultaneous_use,status - Example:
username,password,static_ip,package,expiration,simultaneous_use,status user1,pass123,172.16.10.10,MikroTik_50M,2025-12-31 23:59:59,1,active
-
Create Package:
- Go to Packages → Add Package
- Choose vendor (MikroTik or Cisco)
- Enter rate limit:
- MikroTik:
50M/50M 50M/50M 50M/50M 10/10 - Cisco:
ip:sub-qos-policy-in=PPPoE_50M
- MikroTik:
- Optionally set session timeout, interim interval
-
Package Assignment:
- Packages are assigned to subscribers
- RADIUS attributes stored in
radgroupreplytable - User-to-package mapping in
radusergrouptable
- Add NAS Device:
- Go to NAS Devices → Add NAS Device
- Enter IP address (this goes to
nasnamecolumn) - Enter short name for display
- Select type (mikrotik, cisco, other)
- Enter RADIUS shared secret
- Go to Online Sessions
- See real-time active PPPoE sessions
- Filter by username, IP, MAC, or NAS
- View bandwidth usage (input/output)
- All changes are logged automatically
- View who did what and when
- See before/after JSON data for changes
- radcheck: Per-user check attributes (password, expiration, simultaneous-use)
- radreply: Per-user reply attributes (static IP)
- radgroupcheck: Group check attributes
- radgroupreply: Group reply attributes (rate limits from packages)
- radusergroup: User to group (package) mapping
- radacct: Accounting/session data
- nas: RADIUS clients (MikroTik/Cisco devices)
- app_users: Admin/operator accounts
- packages: Service plans/rate limit definitions
- subscribers: Subscriber metadata (helper table)
- audit_log: Change history
When you create a subscriber, the following happens:
-
radcheck:
Cleartext-Password := <password>Simultaneous-Use := <simultaneous_use>Expiration := <expiration>(if set)Auth-Type := Reject(if suspended)
-
radreply:
Framed-IP-Address := <static_ip>(if set)
-
radusergroup:
- Links username to package group
Stored in radgroupreply:
Mikrotik-Rate-Limit := 50M/50M 50M/50M 50M/50M 10/10Acct-Interim-Interval := 300
Stored in radgroupreply:
Cisco-AVPair := ip:sub-qos-policy-in=PPPoE_50MAcct-Interim-Interval := 300
- Password Hashing: Bcrypt for web panel passwords
- CSRF Protection: Enabled on all forms
- Input Validation: Server-side validation on all inputs
- Role-Based Access: Operators have read-only except password reset and suspend/unsuspend
- Audit Logging: All actions logged with IP address
- Session Management: Database-backed sessions
# View all logs
docker-compose logs -f
# View specific service
docker-compose logs -f app
docker-compose logs -f freeradius# Check if database is ready
docker-compose exec db mysql -u radius -pradiuspass -e "SELECT 1"-
Check FreeRADIUS logs:
docker-compose logs -f freeradius
-
Test from RADIUS server:
docker-compose exec freeradius radtest testuser1 testpass123 localhost 0 testing123 -
Verify NAS device is in
nastable with correct IP and secret
make clean # Stops containers and removes volumes
make up # Start freshmake shell
php artisan migratemake shell
php artisan db:seedmake shell
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:cleardocker-compose exec db mysql -u radius -pradiuspass radiusThe seeder creates:
Admin Users:
admin/Admin123!(Admin role)operator/Operator123!(Operator role)
Packages:
MikroTik_50M- 50Mbps for MikroTikCisco_50M- 50Mbps for Cisco
NAS Devices:
10.0.0.1- MikroTik-BRAS (secret: radiusSecret1)10.0.0.2- Cisco-BNG (secret: radiusSecret2)
Subscribers:
testuser1/testpass123- Active, MikroTik, static IP 172.16.10.10, expires in 30 daysciscouser1/cisco123- Active, Cisco, dynamic IP, expires in 30 daysexpireduser/olduser- Expired and suspendedexpiringuser/expiring123- Expires in 3 dayspermanentuser/permanent123- No expiration, 2 simultaneous sessions
┌─────────────┐
│ Browser │
└──────┬──────┘
│ HTTP (port 80)
▼
┌─────────────┐
│ Nginx │ (web server)
└──────┬──────┘
│ FastCGI
▼
┌─────────────┐
│ PHP-FPM │ (Laravel 11 app)
└──────┬──────┘
│ MySQL protocol
▼
┌─────────────┐
│ MariaDB │ (radius database)
└──────┬──────┘
│
▼
┌─────────────┐
│ FreeRADIUS │ (RADIUS server, rlm_sql_mysql)
└─────────────┘
│ RADIUS protocol (UDP 1812/1813)
▼
┌─────────────┐
│ MikroTik / │ (NAS devices)
│ Cisco │
└─────────────┘
MIT
For issues, questions, or contributions, please refer to the project repository.
Built with Laravel 11 + FreeRADIUS + Docker