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>
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>
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>
Fixed pgrep command to detect running CrowdSec process:
- Changed from `pgrep -x crowdsec` to `pgrep crowdsec`
- The -x flag requires exact process name match which wasn't working
- Affects both check_cscli() and get_status() functions
- Now correctly detects service as running in dashboard
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added service status check in check_cscli() function to immediately return
an error instead of timing out when crowdsec service is not running.
This fixes the 'XHR request timed out' error in the dashboard when CrowdSec
is stopped.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed menu dependency from 'luci-app-crowdsec' to 'luci-app-crowdsec-dashboard'
to match the actual ACL name, making CrowdSec visible in LuCI interface.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>