Backend IP Whitelist Plugin
The Backend IP Whitelist Plugin is a powerful security solution for October CMS that protects your backend by allowing access only from approved IP addresses and ranges. It’s designed to block unauthorized users, enhance compliance, and give organizations greater control over backend access. With multilingual support, an intuitive settings panel, and built-in emergency access, it provides both security and convenience out of the box — developed by Key Agency, experts in October CMS and Laravel development.
For developers, the plugin offers full IPv4/IPv6 and CIDR support, intelligent proxy detection (including Cloudflare and Nginx), detailed logging, and a secure email-based emergency access system. It integrates seamlessly into existing October CMS projects, includes role-based permissions for fine-grained control, and provides artisan commands for maintenance. This plugin is the ideal choice for teams that need a reliable, configurable, and production-ready IP whitelisting solution.
Developed by Key Agency - Expert October CMS & Laravel Development
Backend IP Whitelist Plugin
A comprehensive security plugin for October CMS that restricts backend access to whitelisted IP addresses and ranges.
Developed by Key Agency — Expert October CMS & Laravel Development
Features
Core Security Features
- IP Address Whitelisting: Allow specific IP addresses to access the backend
- CIDR Range Support: Full support for IPv4 and IPv6 CIDR notation (e.g., 192.168.1.0/24)
- Custom Block Messages: Configurable error messages for blocked users
- Security Logging: Optional logging of blocked access attempts with detailed information
Advanced Protection
- Plugin State Awareness: Automatically disables restrictions when plugin is deactivated
- Localhost Protection: Always allows localhost access (127.0.0.1, ::1) by default for development safety
- Proxy & Load Balancer Support: Intelligent detection of real client IPs behind:
- Cloudflare
- Nginx proxy servers
- Standard load balancers
- Various proxy configurations
Emergency Access System
- Email-Based Recovery: Request access when locked out via discreet link
- Token-Based Security: Cryptographically secure, time-limited approval tokens
- Manual or Auto Approval: Choose between admin approval or automatic whitelisting
- Multi-Admin Support: Send notifications to multiple administrators
- Spam Prevention: Customizable button text and duplicate request blocking
- Automatic Cleanup: Expired tokens cleaned up daily
User Experience
- Easy Backend Interface: Intuitive settings panel with comprehensive help
- Real-time Feedback: Blocked users see their detected IP address
- Development Friendly: Safe defaults that won't lock developers out
- Instant Control: Disable plugin to immediately remove all restrictions
- Multilingual Support: Full internationalization with English, Dutch, German, and French translations
- Role-Based Access: Permission-based settings access for enhanced security
Installation
- Place the plugin files in
plugins/key/whitelist/ - Run the migration command:
php artisan october:migrate
- Clear cache:
php artisan cache:clear
Configuration
Navigate to Settings → Security → IP Whitelist in your backend:
General Settings
- Enable IP Whitelist: Master toggle for whitelist protection
- Allowed IP Addresses: Multi-line input for IP addresses and CIDR ranges
- Block Message: Custom message displayed to blocked users
- Protect Entire Site: Apply whitelist to entire website (not just backend)
- Always Allow Localhost: Safety feature for development environments
- Log Blocked Attempts: Enable security event logging
Emergency Access Settings
- Enable Emergency Access: Allow blocked users to request access via email
- Admin Email Addresses: Email addresses that receive access requests (one per line)
- Token Duration: How long access tokens remain valid (in hours)
- Require Manual Approval: Admin must click approval link (recommended for security)
- Access Request Button Text: Customize the button text (keep discreet to prevent spam)
Supported IP Formats
- Single IPv4:
192.168.1.100 - IPv4 CIDR Range:
192.168.1.0/24 - Single IPv6:
2001:db8::1 - IPv6 CIDR Range:
2001:db8::/32
Permissions & Access Control
Role-Based Permissions
The plugin includes built-in permission controls:
- Access Settings Permission:
key.whitelist.access_settings - Restrict who can view and modify IP whitelist settings
- Assign permissions via Settings → Administrators → Manage Roles
Safety & Security
Built-in Safety Features
- Development Safe: Localhost IPs allowed by default
- Plugin Control: Instant disable capability
- Clear Error Messages: Users see their IP and helpful information
- Automatic Failsafe: If no IPs configured, access is allowed
- Permission Protected: Settings access controlled via role-based permissions
Proxy Detection
Automatically detects real client IPs from these headers (in priority order):
HTTP_CF_CONNECTING_IP(Cloudflare)HTTP_X_REAL_IP(Nginx)HTTP_X_FORWARDED_FOR(Standard)HTTP_CLIENT_IP(Proxy)REMOTE_ADDR(Direct)
Troubleshooting
Locked Out?
Quick Recovery Options
-
Method 1 - Emergency Access (Recommended):
- If emergency access is enabled, click the discreet "Need access?" link on the blocked page
- Admin receives email with approval link
- Click approval link to whitelist your IP
-
Method 2 - Plugin Disable:
- Disable plugin in Settings → System → Updates → Manage plugins
-
Method 3 - File System:
- Temporarily rename the plugin folder
-
Method 4 - Cache Clear:
- Run:
php artisan cache:clear
- Run:
Emergency Access Not Working?
- Verify emergency access is enabled in settings
- Check admin email addresses are configured
- Look in spam folder for approval emails
- Verify October CMS mail configuration is working
- Check database for pending requests:
key_whitelist_emergency_accesstable
Testing Checklist
- Add your current IP to whitelist
- Save settings
- Enable whitelist
- Test from different IP/device
- Verify localhost still works
Technical Details
File Structure
plugins/key/whitelist/ ├── Plugin.php # Main plugin registration & routes ├── middleware/WhitelistMiddleware.php # IP validation & emergency access check ├── controllers/EmergencyAccess.php # Emergency access request handler ├── models/ │ ├── Settings.php # Settings with IP parsing & validation │ └── EmergencyAccess.php # Emergency access request model ├── console/CleanupExpiredTokens.php # Artisan command for token cleanup ├── lang/ # Internationalization files │ ├── en/lang.php # English translations │ ├── nl/lang.php # Dutch translations │ ├── de/lang.php # German translations │ └── fr/lang.php # French translations ├── views/ │ ├── blocked.htm # Professional error page │ └── mail/ │ ├── emergency_access_request.htm # HTML email template │ └── emergency_access_request.txt # Plain text email template ├── updates/ │ ├── version.yaml # Version tracking │ └── create_emergency_access_table.php # Emergency access database migration ├── EMERGENCY_ACCESS.md # Complete emergency access documentation └── README.md # This file
Internationalization
The plugin supports multiple languages:
- English (en) — Default
- Dutch (nl) — Nederlands
- German (de) — Deutsch
- French (fr) — Français
All interface text, field labels, and help text are fully translatable.
Console Commands
# Clean up expired emergency access tokens (runs daily at 3am automatically) php artisan whitelist:cleanup-tokens
Routes
The plugin registers the following public routes for emergency access:
GET /whitelist/emergency-access/request— Create access requestGET /whitelist/emergency-access/approve/{token}— Approve request via token
Requirements
- October CMS 3.x
- PHP 8.2+
- Laravel 9.x
- Configured mail settings (for emergency access emails)
Additional Documentation
- EMERGENCY_ACCESS.md — Complete emergency access feature documentation
- CLAUDE.md — Developer guidance for Claude Code assistant
Credits
Developed with ❤️ by Key Agency
Key Agency specializes in:
- October CMS Development
- Laravel Applications
- Custom Plugin Development
- E-commerce Solutions
- Performance Optimization
For professional October CMS development services, contact Key Agency.
License
This plugin is provided for October CMS projects. Use responsibly in production environments.
Need custom October CMS development? Contact Key Agency for expert consultation and development services.
-
Key Agency
Found the plugin useful on 30 Sep, 2025
No need to change your webserver config, works out-of-the-box
-
| 1.1.0 |
Added emergency access system for IP whitelist recovery when locked out. Oct 07, 2025 |
|---|---|
| 1.0.3 |
Added Release Notes tab to settings page with full version history. Sep 30, 2025 |
| 1.0.2 |
Added role-based permissions for settings access. Sep 30, 2025 |
| 1.0.1 |
Improved IP detection for load balancers and proxy servers. Sep 16, 2025 |
| 1.0.0 |
Initialize plugin. Sep 16, 2025 |


