The netifyd collector cron job now persists across reboots:
- Add collector_enabled option to UCI config (secubox-netifyd.sink)
- Create init script (secubox-netifyd-collector) to manage cron job
- Update netifyd-collector-setup with enable/disable/status commands
- Apply collector settings on first boot via uci-defaults
Usage:
netifyd-collector-setup unix /tmp/netifyd-flows.json # Enable
netifyd-collector-setup disable # Disable
netifyd-collector-setup status # Show status
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When deleting multiple UCI firewall rules by index, the indices shift
after each deletion. The previous method using section names didn't
work reliably with fw4's anonymous rules.
New approach uses a while loop that:
- Iterates through rules by index
- Deletes matching rule and restarts from beginning
- Continues until no matching rules found
This ensures all secubox_wan_* rules are properly removed before
reapplying new ones.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rewrite secubox-wan-access to use src="*" (all zones, DMZ style)
- Remove firewall include script (was causing loops)
- Keep only hotplug script for WAN interface up events
- Rules saved in UCI persist across reboots
- Firewall reload runs in background (&) to avoid blocking
- secubox-core bumped to 0.9.0-3
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add apply-noreload command that skips firewall reload
- Firewall include now uses apply-noreload to avoid loop
- apply command still reloads firewall for manual use
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add firewall include script (/etc/firewall.secubox-wan) for fw4 compatibility
- Add hotplug script (/etc/hotplug.d/iface/99-secubox-wan) for WAN interface events
- Configure firewall include in postinst (type=script for fw4)
- secubox-core bumped to 0.9.0-2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added "wan" zone to all network profiles (family_home, small_business, etc.)
- Zone provides internet access without local network access
- Allows users to easily grant internet-only access to clients
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix duplicate firewall rules issue by using section names instead of indices
- UCI section deletion now properly handles all rules for a MAC address
- Prevents index shifting problems when deleting multiple rules
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate apply_client_rules function (second definition was overriding first)
- Improve zone-based firewall rule application:
- Proper MAC address normalization (uppercase)
- Clean rule names without colons (CG_BLOCK_AABBCCDD)
- Quarantine zone blocks WAN but allows DNS/DHCP
- Zone settings (internet_access, local_access) properly applied
- Firewall reload is now synchronous for immediate effect
- Improve remove_client_rules to find and delete all CG_ prefixed rules
- Add debug logging for troubleshooting
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
System Hub enhancements:
- Add cron-based scheduled backup configuration (daily/weekly/monthly)
- Add backup schedule RPCD methods (get_backup_schedule, set_backup_schedule)
- Add live streaming logs with LIVE badge, play/pause, 2s refresh
- Add real component installation detection from secubox state field
- Add service running status detection for components
- Add category-based icons for components (security, network, monitoring)
- Fix status emoji display (✅⚠️❓) for Quick Status Indicators
UI improvements:
- New Scheduled Backups card in backup page with enable/disable toggle
- Time picker for backup schedule (hour/minute selectors)
- Day of week/month selectors for weekly/monthly backups
- Live indicator badge with pulse animation for logs
- Play/Pause button for log streaming control
- New log highlighting with fade-in animation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add console_status, console_enroll, console_disable RPCD methods
- Insert Console enrollment as Step 2 in the 7-step wizard
- Add API declarations and ACL permissions for console operations
- Enable share_manual_decisions, share_tainted, share_context by default on enrollment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add repair_lapi() RPCD method to auto-fix LAPI configuration issues:
- Creates /srv/crowdsec/data directory if missing
- Fixes data_dir and db_path in config.yaml
- Re-registers localhost machine if needed
- Restarts CrowdSec and verifies LAPI is working
- Fix register_bouncer() to handle existing bouncers:
- Deletes existing bouncer before re-registering
- Gets fresh API key on re-registration
- Fix update_firewall_bouncer_config() UCI path:
- Changed from crowdsec.bouncer.$key to crowdsec.@bouncer[0].$key
- Added api_key to allowed parameters
- Rewrite metrics.js with SecuBox cyber-card theming:
- Use Theme.init() for proper theme initialization
- Replace cs-* classes with cyber-* classes
- Add CSS variable fallbacks for light/dark theme support
- Fix hub data parsing for proper component counts
- Add theme require to wizard.js
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix Client Guardian JS files: replace invalid 'require X as Y' syntax
with direct RPC declarations (LuCI doesn't support as alias)
- Add factory default profile to Client Guardian profiles.json
- Redesign Netifyd devices page with modern card-based UI:
- Device type detection with emoji icons
- Gradient summary cards for stats
- Responsive grid layout
- Traffic distribution bars
- Real-time refresh with pulse animation
- Fix Netifyd RPC calls: use correct luci.secubox-netifyd object name
- Add WAN access control feature to secubox-admin
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add wizard.js view for setup wizard integration
- Profile-based configuration (family, iot, secure, business templates)
- Apply zone settings from wizard profiles
- Integration with SecuBox Admin wizard system
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Wizard App Filtering:
- Only show apps with has_wizard=true in App Wizards section
- Previously showed all 39 catalog apps, now shows only 2 with wizards
- Improved user experience by hiding apps without configuration wizards
Profile Application Fixes:
- Fixed API method name: apply_profile → applyProfile (camelCase)
- Fixed parameter name: profile_id → profile
- Added proper JSON response handling with success/message fields
- Fixed rollback_profile → rollbackProfile method name
- Implemented rollbackProfile RPC method using secubox-recovery
- Added rollbackProfile to RPC method list registration
- Profile apply now returns structured success/error responses
- Rollback restores last snapshot created before profile application
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Modified list_apps RPC method to include apps from plugin manifests
- Previously only catalog apps could have has_wizard flag
- Now scans /usr/share/secubox/plugins/*/manifest.json files
- Adds apps with wizard.fields to the apps list even if not in catalog
- If app exists in catalog, adds has_wizard flag
- If app not in catalog, creates new app entry with manifest data
- Fixes wizard page showing "No manifests detected"
- Apps domoticz and lyrion now appear with Configure button
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fixed JavaScript syntax error at line 163 in help.js
- Escaped single quote in "l'équipe" within single-quoted string
- Error: "missing ) after argument list" when loading help page
- Changed _('Écrire à l'équipe') to _('Écrire à l\'équipe')
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed method from 'list_profiles' to 'listProfiles' to match backend
- Fixes wizard showing 'No profiles available'
- Backend uses camelCase method names, not snake_case
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Updated list_apps RPC to scan /usr/share/secubox/plugins/*/manifest.json
- Apps with wizard.fields configuration now get has_wizard: true flag
- Updated secubox-profile to return full JSON profile objects instead of filenames
- Fixes wizard page showing "No profiles available" and "No manifests detected"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add cyber-checkbox class to all checkbox inputs after form render
- Ensures checkboxes are visible and properly styled
- Fixes invisible checkboxes for Enable SecuBox, Debug Mode, etc.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed form sections from type 'secubox' to match actual UCI config
- General/Dashboard/Module/Notification sections now use type 'core'
- Alert Thresholds section now uses type 'diagnostics'
- Security Settings section now uses type 'security'
- Advanced Settings section uses type 'core'
- Fixes "This section contains no values yet" errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- cscli metrics sometimes outputs empty string keys ("": {...})
- This causes RPC parsing errors in LuCI
- Added sed filter to replace empty keys with "unknown"
- Fixes "No related RPC reply" error in metrics view
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add parseScenario() to format scenario names
- Add getCountryFlag() to display country flag emojis
- Add formatRelativeTime() for relative timestamps
- Fix decisions data flattening in handleUnban, handleBulkUnban, submitBan, and polling
- Fix getDashboardData to properly flatten alerts->decisions structure
- Fix context error in overview renderDecisionsTable (this vs self)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix invisible checkboxes in Step 3 collections:
- Add explicit inline styles to checkbox inputs
- Set width: 18px, height: 18px with cursor: pointer
- Add 'for' attribute to label for better click handling
- Replace null rendering with empty element E([])
- Fixes "null" text appearing on screen
Issue: Collection items not selectable, checkboxes invisible
Cause: Checkboxes may be hidden by browser default styles
Solution: Add explicit inline styles and proper label association
Frontend Changes:
- htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js
- Add inline styles to checkbox inputs
- Add 'for' attribute linking label to checkbox
- Replace ': null' with ': E([])' to avoid "null" text
Checkboxes now have:
- Explicit dimensions (18x18px)
- Proper cursor styling
- Label association via 'for' attribute
- No more "null" text rendering
Version: 0.6.0-7
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix Next button remaining disabled despite correct status:
- Change renderStep1 to read from data parameter instead of wizardData
- Read status.crowdsec and status.lapi_status from passed data
- Ensures button state reflects actual API response
Issue: Next button not clickable even with LAPI available
Cause: renderStep1 reading from stale wizardData instead of fresh data
Solution: Read from data parameter passed by render()
Frontend Changes:
- htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js
- renderStep1: Read from data.status instead of this.wizardData
- Extract crowdsecRunning and lapiAvailable from data parameter
Version: 0.6.0-5
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix missing navigation buttons in wizard:
- Add explicit CSS loading in render() method
- Use L.resource() to load wizard.css
- Inject <link> tag into document head
- Ensures wizard styling is applied
Issue: Navigation buttons (Cancel, Next) not visible
Cause: wizard.css was not being loaded
Solution: Add CSS file loading in render method
Frontend Changes:
- htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js
- Add CSS link injection in render()
- Load crowdsec-dashboard/wizard.css via L.resource()
Version: 0.6.0-4
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix wizard Next button being disabled issue:
- Add lapi_status field to get_status() RPC method
- Check LAPI availability using 'cscli lapi status'
- Returns 'available' or 'unavailable' status
- Enables wizard to proceed when LAPI is accessible
Backend Changes:
- root/usr/libexec/rpcd/luci.crowdsec-dashboard
- Add LAPI status check before json_dump
- Run 'cscli lapi status' to verify Local API accessibility
Issue: Wizard showed LAPI as UNAVAILABLE even when working
Cause: Missing lapi_status field in status RPC response
Solution: Add LAPI availability check to backend
Version: 0.6.0-3
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix file permissions for wizard.js and wizard.css:
- Change from 600 (root-only) to 644 (world-readable)
- Allows web server to serve JavaScript and CSS files
- Resolves HTTP 403 Forbidden error when loading wizard
Files Fixed:
- htdocs/luci-static/resources/view/crowdsec-dashboard/wizard.js
- htdocs/luci-static/resources/crowdsec-dashboard/wizard.css
Version: 0.6.0-2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added BUILD.md with complete guide for building the real crowdsec-firewall-bouncer
binary package from upstream OpenWrt feeds using the SDK.
Documentation includes:
- Build environment setup (SDK, golang, feeds)
- Step-by-step build process with commands
- Package details (binary size, architecture, Go version)
- Deployment instructions for router installation
- Integration with secubox-app-crowdsec-bouncer wrapper
- Version update procedures
- Troubleshooting common build issues
- CI/CD integration examples
Successfully Built Package:
- Version: 0.0.31-r2
- Architecture: aarch64_cortex-a72
- Size: 4.9MB compressed, 14MB binary
- Go Version: 1.23.12
- Build Time: ~52 seconds
The binary package was successfully built and deployed to router 192.168.8.191:
- Service running and active
- Last API pull: 2026-01-06T19:49:45Z
- nftables tables created and operational
- Integration with CrowdSec LAPI confirmed
Build Command:
```
cd secubox-tools/sdk
./scripts/feeds install -p packages golang
./scripts/feeds install crowdsec-firewall-bouncer
make package/feeds/packages/crowdsec-firewall-bouncer/compile V=s -j1
```
Output: bin/packages/aarch64_cortex-a72/packages/crowdsec-firewall-bouncer_0.0.31-r2_aarch64_cortex-a72.ipk
This provides complete control over the binary version and enables self-contained
deployment without relying on external pre-built binaries.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added missing RPCD ACL permissions for the new firewall bouncer
management methods to resolve "Access denied" errors.
ACL Changes:
- Added read permissions:
* firewall_bouncer_status - Get service and nftables status
* firewall_bouncer_config - Read UCI configuration
* nftables_stats - Get blocked IPs and rules statistics
- Added write permissions:
* control_firewall_bouncer - Start/stop/restart/enable/disable service
* update_firewall_bouncer_config - Modify UCI settings
These permissions allow the bouncers page to fully manage the firewall
bouncer service through the LuCI web interface.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enhanced CrowdSec Dashboard bouncers page with comprehensive firewall
bouncer management capabilities.
New Features:
- Dedicated Firewall Bouncer management card with 3 status panels:
* Service Status: Running/stopped, boot start enabled/disabled, configured status
* Blocked IPs: Real-time IPv4/IPv6 blocked IP counts with View Details modal
* nftables Status: IPv4/IPv6 table active status
- Service Control Buttons:
* Start/Stop service (contextual based on current state)
* Restart service
* Enable/Disable boot start (contextual)
* Configuration viewer
- Real-time Updates:
* Auto-refresh every 10 seconds via polling
* Manual refresh button
* Live status badge updates
- nftables Details Modal:
* Lists all blocked IPv4 addresses (scrollable)
* Lists all blocked IPv6 addresses (scrollable)
* Shows IPv4/IPv6 rules count
* Formatted with monospace font
- Configuration Viewer Modal:
* Displays all UCI configuration settings
* Shows enabled/disabled status
* Shows IPv4/IPv6 support
* Shows API URL, update frequency, deny action
* Shows deny logging and log prefix
* Shows configured network interfaces
* Handles unconfigured state with installation prompt
UI Enhancements:
- Responsive grid layout for status cards
- Color-coded status indicators (green=active, red=stopped, gray=disabled, yellow=warning)
- Material design badges for all status indicators
- Visual feedback for all operations with notifications
- Loading spinners for async operations
- Professional styling consistent with SecuBox theme
Integration:
- Utilizes new API methods: getFirewallBouncerStatus, controlFirewallBouncer,
getFirewallBouncerConfig, getNftablesStats
- Error handling with user-friendly notifications
- Proper promise chaining and async/await patterns
Technical Details:
- Added renderFirewallBouncerCard() method (125 lines)
- Added handleFirewallBouncerControl() method for service actions
- Added handleFirewallBouncerRefresh() for manual/auto refresh
- Added showNftablesDetails() modal for blocked IPs
- Added showFirewallBouncerConfig() modal for UCI settings
- Enhanced load() to fetch firewall bouncer data
- Updated polling to refresh firewall bouncer status
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add comprehensive backend support for managing the CrowdSec Firewall Bouncer
through the dashboard with full control and monitoring capabilities.
RPC Backend Enhancements (luci.crowdsec-dashboard):
- get_firewall_bouncer_status: Detailed status (running, enabled, UCI config, nftables)
- control_firewall_bouncer: Service control (start/stop/restart/enable/disable)
- get_firewall_bouncer_config: Read UCI configuration
- update_firewall_bouncer_config: Modify UCI settings
- get_nftables_stats: nftables statistics (blocked IPs, rules count)
API Methods Added (api.js):
- getFirewallBouncerStatus(): Get bouncer status and health
- controlFirewallBouncer(action): Control service lifecycle
- getFirewallBouncerConfig(): Read configuration
- updateFirewallBouncerConfig(key, value): Update settings
- getNftablesStats(): Get firewall statistics
Features:
- Real-time service status monitoring
- nftables table detection (IPv4/IPv6)
- Blocked IP counting
- UCI configuration management
- Service lifecycle control
- Comprehensive error handling
Status Information Provided:
- Service running state
- Init script enabled state
- UCI configuration status
- nftables tables active (crowdsec, crowdsec6)
- Blocked IPv4/IPv6 count
- Rules count per table
Configuration Options Supported:
- enabled, ipv4, ipv6 (boolean)
- api_url, update_frequency, deny_action, log_level (string)
- deny_log, filter_input, filter_forward (boolean)
- interfaces list
Next: Frontend UI enhancements for bouncer management panel
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>