🎯 Web Interface Overview
RFS-Portable-BTS provides a comprehensive web-based management interface for monitoring, configuring, and managing your portable BTS system. The interface offers real-time monitoring, configuration management, and security testing tools.
✅ Key Features
Real-time monitoring dashboard, configuration management, security testing tools, and comprehensive system administration interface.
📊 Dashboard Components
📈 System Status
- BTS operational status
- CPU and memory usage
- Network connectivity
- Service health checks
- Temperature monitoring
- Power consumption
📱 Network Statistics
- Active connections
- Call statistics
- SMS traffic
- Data usage
- Signal strength
- Coverage area
🔐 Security Overview
- Authentication attempts
- Security alerts
- Access logs
- Threat detection
- Compliance status
- Audit trails
🔧 Installation and Setup
Web Server Configuration
#!/bin/bash # Install web interface components # Install Apache and PHP sudo apt update sudo apt install -y apache2 php php-mysql php-curl php-json php-mbstring # Install Node.js for frontend tools curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs # Create web interface directory sudo mkdir -p /var/www/yatebts sudo chown -R www-data:www-data /var/www/yatebts # Install frontend dependencies cd /var/www/yatebts sudo -u www-data npm init -y sudo -u www-data npm install chart.js axios moment echo "Web interface components installed successfully"
Apache Virtual Host
# Create /etc/apache2/sites-available/yatebts.confServerName yatebts.local DocumentRoot /var/www/yatebts # Enable site sudo a2ensite yatebts sudo a2enmod rewrite sudo systemctl reload apache2AllowOverride All Require all granted # Enable mod_rewrite RewriteEngine On # API endpoints RewriteRule ^api/(.*)$ api/index.php [QSA,L] # Static files RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.html [QSA,L] ErrorLog ${APACHE_LOG_DIR}/yatebts_error.log CustomLog ${APACHE_LOG_DIR}/yatebts_access.log combined
📱 Interface Components
🏠 Main Dashboard
- System overview
- Real-time metrics
- Quick actions
- Status indicators
- Navigation menu
- User profile
📊 Monitoring Panel
- Live charts and graphs
- Performance metrics
- Alert notifications
- Historical data
- Export capabilities
- Custom dashboards
⚙️ Configuration
- System settings
- Network configuration
- Security policies
- User management
- Service settings
- Backup/restore
🔐 Security Features
🛡️ Authentication
- Multi-factor authentication
- Role-based access control
- Session management
- Password policies
- API key management
- Audit logging
🔒 Data Protection
- HTTPS encryption
- Data encryption at rest
- Secure API endpoints
- Input validation
- CSRF protection
- XSS prevention
Security Configuration
# Create /var/www/yatebts/.htaccess # Security headers Header always set X-Content-Type-Options nosniff Header always set X-Frame-Options DENY Header always set X-XSS-Protection "1; mode=block" Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains" # Disable server signature ServerTokens Prod ServerSignature Off # Protect sensitive filesRequire all denied # API authenticationAuthType Basic AuthName "YateBTS API" AuthUserFile /etc/apache2/.htpasswd Require valid-user
📊 API Endpoints
📈 System API
- GET /api/system/status
- GET /api/system/metrics
- GET /api/system/logs
- POST /api/system/restart
- GET /api/system/config
- PUT /api/system/config
📱 Network API
- GET /api/network/connections
- GET /api/network/statistics
- GET /api/network/calls
- GET /api/network/sms
- POST /api/network/send-sms
- GET /api/network/coverage
🔐 Security API
- GET /api/security/alerts
- GET /api/security/logs
- POST /api/security/block
- GET /api/security/users
- POST /api/security/users
- PUT /api/security/users/{id}
API Implementation
'Authentication required']);
exit;
}
$auth = $_SERVER['HTTP_AUTHORIZATION'];
if (strpos($auth, 'Basic ') !== 0) {
http_response_code(401);
echo json_encode(['error' => 'Invalid authentication']);
exit;
}
}
// Get system status
function getSystemStatus() {
$status = [
'bts_status' => shell_exec('systemctl is-active yatebts'),
'cpu_usage' => sys_getloadavg()[0],
'memory_usage' => memory_get_usage(true),
'disk_usage' => disk_free_space('/'),
'uptime' => shell_exec('uptime -p'),
'timestamp' => date('c')
];
return $status;
}
// Get network statistics
function getNetworkStats() {
$stats = [
'active_connections' => (int)shell_exec('cat /var/log/yatebts/connections.log | wc -l'),
'total_calls' => (int)shell_exec('cat /var/log/yatebts/calls.log | wc -l'),
'total_sms' => (int)shell_exec('cat /var/log/yatebts/sms.log | wc -l'),
'signal_strength' => shell_exec('cat /var/log/yatebts/signal.log | tail -1'),
'timestamp' => date('c')
];
return $stats;
}
// Route requests
$request = $_SERVER['REQUEST_URI'];
$method = $_SERVER['REQUEST_METHOD'];
// Remove query string
$request = strtok($request, '?');
// Route to appropriate function
switch ($request) {
case '/api/system/status':
if ($method === 'GET') {
echo json_encode(getSystemStatus());
}
break;
case '/api/network/statistics':
if ($method === 'GET') {
echo json_encode(getNetworkStats());
}
break;
default:
http_response_code(404);
echo json_encode(['error' => 'Endpoint not found']);
break;
}
?>
🎨 Frontend Implementation
Dashboard HTML
RFS-Portable-BTS Dashboard
RFS-Portable-BTS Dashboard
System Status
BTS Status: Loading...
CPU Usage: -
Memory: -
Uptime: -
Network Statistics
Active Connections: -
Total Calls: -
Total SMS: -
Signal Strength: -
Performance Chart
🚀 Access Web Interface
Set up and access the comprehensive web management interface
📖 Installation Guide 🔧 Troubleshooting 💬 Community Support