Open
Conversation
New plugin: os-autorollback - Automatic configuration rollback with safe mode. Inspired by Juniper JUNOS "commit confirmed" and MikroTik RouterOS Safe Mode, this plugin provides automatic configuration rollback for OPNsense. When safe mode is activated, a timer begins counting down. If the administrator does not confirm the changes before the timer expires, the configuration is automatically rolled back to the pre-change state. Features: - Safe mode with configurable countdown timer (default 300s) - Three rollback triggers: timer expiry, connectivity watchdog, boot recovery - Connectivity watchdog monitors configurable targets every minute via cron - Early boot recovery via syshook detects crashed safe mode sessions - Dashboard widget with real-time countdown and one-click confirm/revert - Global banner on every page during active safe mode - Atomic config restore with safety backup and path traversal protection - Firmware update awareness (blocks rollback during upgrades) - Full MVC architecture with API endpoints and configd backend integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… data The dashboard widget's extend button was using JSON.stringify() to send the seconds parameter, but the PHP controller reads it via getPost() which expects form-encoded data. Changed to pass a plain object so jQuery serializes it correctly as form data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New plugin: os-autorollback — Automatic configuration rollback with safe mode for OPNsense.
Inspired by Juniper JUNOS
commit confirmedand MikroTik RouterOS Safe Mode, this plugin protects administrators from locking themselves out during configuration changes.How it works
Features
Architecture
src/opnsense/scripts/autorollback/— Python backend (safemode, timer, rollback, watchdog, status)src/opnsense/mvc/— MVC controllers, models, views, formssrc/opnsense/www/js/— Dashboard widget + global banner JSsrc/opnsense/service/conf/actions.d/— configd action definitionssrc/etc/rc.syshook.d/— Config change hook + early boot recoverysrc/etc/inc/plugins.inc.d/— Plugin registration (cron, services, syslog)Testing
Tested on OPNsense 25.1 (FreeBSD 14). All rollback paths verified:
Source
Development repository: https://github.com/mplind/os-autorollback