Skip to content

agit8or1/OPNMGR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OPNManager - OPNsense Firewall Management Platform

GitHub Stars

Status: Production Stable | License: MIT | Version: v3.9.3 | Agent: v1.4.0

A comprehensive web-based management platform for centralized monitoring, configuration, and maintenance of OPNsense firewalls.

If you find OPNManager useful, please consider giving it a star on GitHub — it helps others discover the project!


Key Features

Firewall Management

  • Centralized Dashboard: Monitor all firewalls from a single interface
  • Real-time Status: Live agent check-ins every 2 minutes
  • Plugin Agent: Native OPNsense plugin with auto-update support
  • Health Monitoring: CPU, memory, disk, uptime, network status
  • Tag System: Organize firewalls with color-coded tags
  • Customer Grouping: Multi-tenant support with customer organization

Network & Traffic Monitoring

  • WAN Traffic Charts: Real-time throughput graphs with auto-scaling (Mb/s / Gb/s)
  • Interface Status: Per-interface RX/TX byte counters with error tracking
  • Latency Monitoring: Continuous ping measurement to multiple targets
  • Bandwidth Testing: On-demand iperf3 speed tests with multi-server fallback
  • Smart Counter Detection: Automatic fallback to pf counters when driver-level counters are broken (virtio_net)

System Monitoring

  • Accurate Uptime Tracking: Real system uptime from agent
  • Version Tracking: OPNsense version, agent version, available updates
  • One-Click Updates: Trigger OPNsense updates with animated progress status
  • Reboot Control: Clickable "Reboot Required" badge triggers remote reboot with confirmation
  • Stuck Update Recovery: Auto-recovery for updates stuck >15 minutes
  • System Stats: CPU, memory, disk usage charts (1h, 4h, 12h, 24h, 1w, 30d timeframes)

Command Execution

  • Remote Command Queue: Execute commands on firewalls remotely
  • Base64 Encoding: Support for complex multi-line commands
  • Command History: Track all executed commands with timestamps
  • Output Capture: View command results in real-time

Configuration Backup

  • Automated Backups: Scheduled configuration backups
  • Manual Backups: On-demand backup creation
  • Backup Management: Download, restore, and delete backups
  • Retention Policies: Automatic cleanup of old backups

AI-Powered Security Analysis

  • Intelligent Configuration Review: AI-driven analysis of firewall configurations
  • Security Recommendations: Automated suggestions for improving security posture
  • Risk Assessment: Identify potential vulnerabilities and misconfigurations

Secure Connectivity

  • On-Demand SSH Tunnels: Dynamic reverse tunnels with no exposed ports
  • Web Proxy: Access firewall web UI through the manager
  • Automatic Cleanup: Tunnel sessions timeout and clean up automatically

Screenshots

Login

Login

Dashboard

Dashboard

Firewall Management

Firewalls

Firewall Details - Overview

Firewall Overview

System Statistics & Charts

Charts

Network Diagnostics

Network Tools

Configuration Backups

Backups

Command Log

Commands

Security & SSH Keys

Security

AI Analysis

AI

Customer Management

Customers

Tag Management

Tags

Queue Management

Queue

User Administration

Users

System Logs

Logs

Health Monitor

Health Monitor

Settings

Settings

User Documentation

Documentation

About & Version Info

About

Add Firewall

Add Firewall

User Profile

Profile


System Requirements

Server Requirements

  • OS: Ubuntu 22.04 LTS or newer
  • PHP: 8.0 or higher
  • MySQL/MariaDB: 8.0+ / 10.6+
  • Web Server: Apache 2.4+ or Nginx 1.18+
  • Disk Space: Minimum 10GB (20GB+ recommended for backups)
  • Memory: Minimum 2GB RAM (4GB+ recommended)

Managed Firewalls

  • OPNsense: 20.7+ (tested up to 25.7.x)
  • FreeBSD: 13.x or 14.x
  • Connectivity: Outbound HTTPS (443) access to manager server

Quick Start

1. Server Installation

# Clone the repository
cd /var/www
git clone https://github.com/agit8or1/OPNMGR.git opnsense

# Set proper permissions
chown -R www-data:www-data /var/www/opnsense
chmod 755 /var/www/opnsense

# Import database schema
mysql -u root -p < /var/www/opnsense/database/schema.sql

# Configure database connection
cp /var/www/opnsense/inc/db.php.example /var/www/opnsense/inc/db.php
# Edit inc/db.php with your DB_HOST, DB_NAME, DB_USER, DB_PASS

# Configure Apache virtual host and reload
a2ensite opnmanager
systemctl reload apache2

2. Firewall Enrollment

Option A: Quick Enrollment (Recommended)

  1. Log into OPNManager web interface
  2. Navigate to Firewalls > Add Firewall
  3. Generate an enrollment key
  4. On the OPNsense firewall, run the one-liner install command shown on the page

Option B: Manual Plugin Installation

# On the OPNsense firewall, install the agent plugin:
fetch -o - https://<your-opnmgr-server>/downloads/plugins/install_opnmanager_agent.sh | sh

Then configure the agent via the OPNsense web GUI under Services > OPNManager Agent.

3. Agent Plugin

The OPNManager agent installs as a native OPNsense plugin:

  • Plugin location: /usr/local/opnsense/scripts/OPNsense/OPNManagerAgent/agent.sh
  • Configuration: Via OPNsense GUI (Services > OPNManager Agent)
  • Service management: service opnmanager_agent start|stop|restart
  • Logs: /var/log/opnmanager_agent.log
  • Auto-update: Agent checks for updates on each check-in and self-updates

Configuration

Agent Check-in

The agent checks in every 2 minutes by default. On each check-in, it reports:

  • System stats (CPU, memory, disk)
  • Network interface status and traffic counters
  • Latency measurements
  • OPNsense version and update availability
  • Pending command results

Traffic Counter Intelligence

The agent uses the best available counter source:

  • Link layer (default): Captures all traffic including forwarded/NAT
  • pf counters (fallback): Used when Link-layer counters are frozen (common with virtio_net on VPS)
  • IP layer (last resort): Per-address traffic only

Security

Authentication

  • Secure password hashing (PHP password_hash)
  • Session management with CSRF protection
  • Login attempt logging

Agent Communication

  • HTTPS-only agent check-ins
  • Hardware ID-based firewall identification
  • Base64-encoded command payloads
  • PID file locking prevents duplicate agents

Secure Connections

  • On-demand SSH reverse tunnels (dynamic port allocation 8100-8200)
  • No exposed firewall ports required
  • Automatic tunnel session cleanup

Troubleshooting

Agent Not Checking In

# On the OPNsense firewall:
service opnmanager_agent status
tail -20 /var/log/opnmanager_agent.log

Network Data Shows Incorrect Values

  • Ensure agent is v1.5.6+ (supports pf counter fallback for virtio_net)
  • Check agent log for "Link layer counter frozen" messages
  • Traffic data accumulates over time; new installations need ~24h for full graphs

License

This project is licensed under the MIT License - see the LICENSE file for details.


Support

About

OPNsense Manager - Centralized firewall management platform with web GUI, automated updates, security scanning, and monitoring

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors