Commit Graph

4 Commits

Author SHA1 Message Date
252341e045 feat: Add complete CrowdSec integration for OpenWrt 24.10+
New packages:
- secubox-crowdsec-setup: Automated installation script with:
  - Prerequisites verification (RAM, flash, OpenWrt version)
  - syslog-ng4 configuration for log forwarding
  - CAPI registration and hub setup
  - nftables firewall bouncer configuration
  - Backup/rollback, repair, and uninstall modes

- luci-app-secubox-crowdsec: LuCI dashboard with:
  - Service status and statistics dashboard
  - Active decisions (bans) management
  - Security alerts viewer
  - Collections and bouncers management
  - UCI-based settings configuration

Enhanced existing packages:
- luci-app-crowdsec-dashboard: Added acquisition configuration wizard
- secubox-app-crowdsec: Improved defaults and configuration

Documentation:
- CROWDSEC-OPENWRT-24.md with architecture, installation, and troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:58:17 +01:00
8d5e4275f6 fix: CrowdSec CAPI registration and enable threat intelligence
CrowdSec Central API (CAPI) Fixed:
- Removed code that disabled online_client on install
- Added proper CAPI registration in crowdsec.defaults
- Registration now works (previous 403 errors were transient)
- Graceful fallback if CAPI registration fails

CAPI Features Now Working:
- Threat intelligence sharing enabled
- Pulling community blocklist (14,997+ IPs)
- Hub updates working without 403 errors
- SSH bruteforce: 12,388 bans from CAPI
- Generic scans: 1,176 bans from CAPI
- SSH exploits: 1,433 bans from CAPI

Registration Flow:
1. Create /etc/machine-id if missing
2. Register local API machine
3. Register with Central API (CAPI)
4. On CAPI failure, create minimal credentials file
5. Update hub index
6. Install default collections

Benefits of CAPI Integration:
- Real-time threat intelligence from global network
- Community-contributed IP blocklists
- Automatic updates for detection scenarios
- Signal sharing to help protect others
- Enhanced protection without manual IP list management

NetIfyd Dashboard Improvements:
- Added data caching for smoother updates
- Application aggregation function
- Fallback stats when data temporarily unavailable
- Better handling of undefined values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 18:33:23 +01:00
2168d76f96 fix: CrowdSec defaults - disable CAPI & improve setup robustness
Package Installation Improvements:
- Automatically create /etc/machine-id from UUID if missing
- Disable Central API (CAPI) by default in config.yaml
- Create minimal online_api_credentials.yaml to prevent errors
- Add fallback curl download for hub index (works around 403 errors)
- Make all setup commands non-fatal with || true

CAPI Status:
- Disabled by default due to HTTP 403 errors from api.crowdsec.net
- Custom User-Agent (crowdsec/v1.7.4-openwrt-*) appears blocked
- Can be manually enabled with: cscli console enroll <key>
- Local-only mode provides full SSH brute-force protection

Hub Updates:
- Manual curl download works (HTTP 200)
- cscli hub update fails (HTTP 403)
- Weekly auto-update via curl in defaults script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 16:49:45 +01:00
029b1796d4 feat(crowdsec): add secubox-app daemon 2025-12-30 13:00:59 +01:00