If you find this project useful, consider supporting its development:
0xe0b9015117a4a69131481c2e9c1553dde839df18
Also Binance Gift cards can work by sending it to the email etreginwow@gmail.com
Table of Contents
- π About The Project
- π Getting Started
- β¨ Features
- π Authentication & Security
- π Dashboard
- π₯ Firewall Management (Currently only works with "Firewall > Automation > Filter" rules)
- π Firewall Logs
- π Live Network Monitoring
- π‘ DHCP Lease Management
- βΉοΈ System Information
- π§ Service Management
- βοΈ Settings
- π Additional Features
- π‘οΈ Security Considerations
- ποΈ Architecture
- πΊοΈ Roadmap
- π€ Contributing
- π Troubleshooting
- π License
- π¬ Getting Help
- π Acknowledgments
OPNsense is a professional Flutter mobile application for managing OPNsense firewall routers. Monitor system status, manage firewall rules, view logs, control services, and manage your network security from your mobile device.
I could not find an mobile application that can do what I needed so I decided to create my own and share it with the community.
- Android: API 21 (Android 5.0) or higher
- iOS: iOS 12.0 or higher
- OPNsense: Version 20.7 or higher with API access enabled
On your OPNsense firewall:
- Go to System β Access β Users
- Create a new user or edit existing
- Generate API credentials (Key + Secret)
- Configure user permissions using one of these methods:
- Add the API user to the "admins" group under Group Membership
- This grants full access to all features in both the OPNsense web interface and the mobile app
- β Best for users who want complete management capabilities
- β No permission configuration needed
- β Works across all OPNsense versions
Configure individual permissions based on what you want to access. The app requires the same permissions as the OPNsense web interface:
Important: If you can access a feature in the OPNsense web GUI with your API user, the mobile app will also be able to access it. If you cannot access it in the web GUI, the app won't be able to access it either.
π‘ Tip: To verify permissions are working, log in to the OPNsense web interface with your API user credentials. Any page you can access in the web GUI will also work in the mobile app. Any page you cannot access will return a 403 error in the app.
β οΈ Note: After changing permissions, you must log out and log back in to OPNsense for changes to take effect. Also restart the mobile app completely.
- Go to the Releases page
- Download the latest APK file
- Install on your Android device
- Grant necessary permissions when prompted
See CONTRIBUTING.md for detailed build instructions.
- Secure API Authentication: API key/secret based authentication with encrypted storage
- Multiple Profile Management: Manage multiple OPNsense instances seamlessly
- PIN Lock: Secure app access with 4-6 digit PIN code
- Biometric Authentication: Face ID, Touch ID, or Fingerprint support
- Auto-Lock: Configurable session timeout with automatic locking
- Secure Storage: Platform-specific encrypted credential storage (Keychain/Keystore)
- System Overview: Real-time display of hostname, version, and platform information
- Resource Monitoring: Live CPU and memory usage with visual indicators
- Service Management: View, start, stop, and restart system services with confirmation dialogs
- Gateway Status: Monitor gateway health and connectivity
- System Uptime: Formatted uptime display
- Quick Navigation: Easy access to all features from the main screen
- Pull-to-Refresh: Update data with a simple swipe gesture
- Auto-Refresh: Configurable automatic data updates
- View Rules: List all firewall rules with detailed information and status
- Create Rules: Add new firewall rules with comprehensive configuration options
- Edit Rules: Modify existing rules with full parameter control
- Delete Rules: Remove unwanted rules with confirmation dialogs
- Toggle Rules: Enable/disable rules with a single tap
- Rule Details: View complete rule configuration including:
- Action (Pass/Block/Reject)
- Interface (WAN/LAN/OPT, etc.)
- Protocol (TCP/UDP/ICMP/Any)
- Source and destination addresses with CIDR notation
- Port specifications and ranges
- Rule descriptions and labels
- Creation and modification timestamps
- Real-time Logs: View firewall activity as it happens
- Filter by Action: Show only Pass, Block, or Reject events
- Search Functionality: Find specific log entries quickly
- Detailed Information: View packet details including:
- Source and destination IP addresses
- Source and destination ports
- Protocol information
- Timestamps with timezone
- Rule IDs and actions
- Interface information
- Auto-Refresh: Configurable automatic log updates (5-60 seconds)
- Log Limit: Adjustable number of log entries displayed
- Active Leases: View all current DHCP leases on your network
- Lease Details: Complete information for each lease including:
- IP address assignments
- MAC addresses
- Hostnames
- Lease start and end times
- Interface information
- Device Blocking: Block devices directly from the DHCP leases view
- Search Functionality: Quickly find specific devices by IP, MAC, or hostname
- Pull-to-Refresh: Update lease information on demand
- Firmware Details:
- System type (OPNsense)
- Version number
- Architecture (amd64, etc.)
- Git commit hash
- Package mirror URL
- Repository information with priority
- Last update timestamp
- System Status:
- Hostname
- Platform (FreeBSD version)
- System uptime
- Pull-to-Refresh: Update system information on demand
- Service Control: Start, stop, and restart system services
- Service Status: Real-time service status indicators
- Confirmation Dialogs: Prevent accidental service disruptions
- Visual Feedback: Color-coded status indicators (running/stopped)
- Service List: View all available system services
- Theme Control: Toggle between light and dark modes
- PIN Lock Configuration: Set up and change PIN code
- Biometric Setup: Enable/disable biometric authentication
- Session Timeout: Configure auto-lock duration (1-60 minutes)
- Profile Management:
- Add new OPNsense profiles
- Edit existing profiles
- Delete profiles with confirmation
- Switch between profiles instantly
- Profile-specific credentials
- App Lock: Manually lock the app for security
- About Screen: View app information, version, and licenses
- Firewall Reboot: Remotely reboot your OPNsense firewall with confirmation
- Profile Switching: Quickly change between different OPNsense instances
- Connection Testing: Verify API connectivity before saving profiles
- Error Handling: Comprehensive error messages and recovery options
- Offline Support: Graceful handling of network issues
- Material Design 3: Modern, beautiful UI following Material Design guidelines
- Responsive Layout: Optimized for various screen sizes
- β API credentials stored using platform-specific secure storage (Keychain/Keystore)
- β HTTPS enforced for all API communications
- β Self-signed certificate support (configurable per profile)
- β PIN lock with biometric authentication
- β Auto-lock on app background
- β No credentials logged or exposed in production
- β Confirmation dialogs for destructive actions
- β Session timeout for automatic security
β οΈ Certificate pinning not implemented (consider for production environments)
- Get Firewall rules to work with ALL rules
- VPN connection management (OpenVPN, Tailscale, WireGuard)
- Push notifications for system alerts
- Backup/restore configuration functionality
- Package management interface
- Multi-language support (i18n) - Supports English, Arabic, Spanish, French, and German with easy extensibility for more languages
- Tablet-optimized layouts
- Traffic monitoring with detailed charts
- Bandwidth quota management
- Interface statistics and graphs
- DHCP lease management - View active leases and block devices
- Live network monitoring - Real-time network activity monitoring with device blocking capability
- DNS configuration
- Certificate management
- User management interface
- Scheduled tasks/cron jobs
- Plugin management
- Export/import profiles - Export and import connection profiles as JSON files
See the open issues for a full list of proposed features (and known issues).
This project follows modern Flutter best practices with a clean, maintainable architecture:
- Models: Data classes with JSON serialization (
lib/models/) - Views: UI components and screens (
lib/screens/,lib/widgets/) - ViewModels: Business logic and state management (
lib/viewmodels/)
- β Modular Design: Reusable components and services
- β Separation of Concerns: Clear boundaries between UI and business logic
- β
Base Classes:
BaseFormViewModelandBaseListViewModelfor consistency - β Service Layer: Organized services following Single Responsibility Principle
- β Widget Components: 42+ reusable UI components
- β Type Safety: Full Dart null-safety support
lib/
βββ models/ # Data models with JSON serialization
βββ screens/ # Main screen widgets
βββ viewmodels/ # Business logic and state management
β βββ base/ # Base ViewModel classes
βββ widgets/ # Reusable UI components
β βββ common/ # Shared widgets
β βββ login/ # Login-specific widgets
β βββ dashboard/ # Dashboard widgets
β βββ firewall/ # Firewall management widgets
β βββ settings/ # Settings widgets
β βββ tailscale/ # Tailscale widgets
β βββ vpn/ # VPN widgets
β βββ wireguard/ # WireGuard widgets
βββ services/ # API and business services
β βββ base/ # Base service classes
β βββ demo/ # Demo mode services
β βββ firewall/ # Firewall services
β βββ network/ # Network services
β βββ profile/ # Profile management
β βββ settings/ # Settings services
β βββ system/ # System services
β βββ vpn/ # VPN services
βββ utils/ # Utility functions and validators
- Static Analysis: 0 issues with
flutter analyze - Code Reduction: ~2,827 lines reduced through refactoring
- Maintainability: Average file size reduced from ~350 to ~250 lines
- Documentation: Comprehensive inline documentation
For detailed information about the architecture and refactoring process, see REFACTORING_SUMMARY.md.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Review CONTRIBUTING.md for ways to get started.
Don't forget to give the project a star! Thanks again!
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the code style: Use
flutter analyzeand fix any issues - Write meaningful commit messages
- Test your changes thoroughly on both Android and iOS if possible
- Update documentation if needed
- Submit a pull request with a clear description of changes
Check existing issues to avoid duplicates, Use the issue template when creating new issues and Provide detailed information:
- App version
- Device and OS version
- OPNsense version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Error messages or logs
- Verify OPNsense API is enabled in System β Settings β Administration
- Check firewall rules allow connections from mobile device IP
- Confirm API key/secret are correct and not expired
- Test HTTPS certificate (allow self-signed certificates in profile settings)
- Verify API user has required permissions
- Ensure device has biometric hardware (fingerprint sensor, Face ID, etc.)
- Check app permissions are granted in device settings
- Verify biometric is enrolled on device
- Try disabling and re-enabling biometric in app settings
- Verify API user has System: Status permissions
- Check service names match OPNsense service IDs
- Ensure services are installed and available on your OPNsense instance
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
We chose GPLv3 to ensure that:
- The software remains free and open source
- Any modifications or derivatives must also be open source
- Users have the freedom to use, study, share, and modify the software
- The community benefits from improvements and contributions
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: Etreginwow@gmail.com
If you discover a security vulnerability, please email Etreginwow@gmail.com instead of using the issue tracker.
- OPNsense team for the excellent firewall platform







