secubox-openwrt/package/secubox/luci-app-crowdsec-dashboard/Makefile
CyberMind-FR cec4893db9 feat(security): Implement SysWarden Evolution #1-3 security enhancements
Evolution #1 - IP Blocklist (secubox-app-ipblocklist, luci-app-ipblocklist):
- Pre-emptive blocking layer with ipset (~100k IPs)
- Default sources: Data-Shield, Firehol Level 1
- Supports nftables (fw4) and iptables backends
- LuCI KISS dashboard with sources/whitelist management

Evolution #2 - AbuseIPDB Reporter (luci-app-crowdsec-dashboard v0.8.0):
- New "AbuseIPDB" tab in CrowdSec Dashboard
- crowdsec-reporter.sh CLI for reporting blocked IPs
- RPCD handler luci.crowdsec-abuseipdb with 9 methods
- Cron job for automatic reporting every 15 minutes
- IP reputation checker in dashboard

Evolution #3 - Log Denoising (luci-app-system-hub v0.5.2):
- Three modes: RAW, SMART (noise ratio), SIGNAL_ONLY (filter known IPs)
- Integrates with IP Blocklist ipset + CrowdSec decisions
- RPCD methods: get_denoised_logs, get_denoise_stats
- Denoise mode selector panel with noise ratio indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 20:11:24 +01:00

81 lines
2.6 KiB
Makefile

# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2024 CyberMind.fr - Gandalf
#
# LuCI CrowdSec Dashboard - Real-time security monitoring interface
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-crowdsec-dashboard
PKG_VERSION:=0.8.0
PKG_RELEASE:=1
PKG_ARCH:=all
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
LUCI_TITLE:=LuCI CrowdSec Dashboard
LUCI_DESCRIPTION:=Real-time security monitoring dashboard for CrowdSec on OpenWrt
LUCI_DEPENDS:=+luci-base +luci-lib-jsonc +rpcd +rpcd-mod-luci +crowdsec
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
define Package/luci-app-crowdsec-dashboard/conffiles
/etc/config/crowdsec-dashboard
/etc/config/crowdsec_abuseipdb
endef
define Package/luci-app-crowdsec-dashboard/install
# UCI config files
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./root/etc/config/crowdsec-dashboard $(1)/etc/config/
$(INSTALL_CONF) ./root/etc/config/crowdsec_abuseipdb $(1)/etc/config/
# Cron job for AbuseIPDB reporter
$(INSTALL_DIR) $(1)/etc/cron.d
$(INSTALL_DATA) ./root/etc/cron.d/crowdsec-reporter $(1)/etc/cron.d/
# Reporter script
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./root/usr/sbin/crowdsec-reporter.sh $(1)/usr/sbin/
# RPCD backends (MUST be 755 for ubus calls)
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.crowdsec-dashboard $(1)/usr/libexec/rpcd/
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.crowdsec-abuseipdb $(1)/usr/libexec/rpcd/
# ACL permissions
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/luci-app-crowdsec-dashboard.json $(1)/usr/share/rpcd/acl.d/
# LuCI menu
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/luci-app-crowdsec-dashboard.json $(1)/usr/share/luci/menu.d/
# JavaScript API module
$(INSTALL_DIR) $(1)/www/luci-static/resources/crowdsec-dashboard
$(INSTALL_DATA) ./htdocs/luci-static/resources/crowdsec-dashboard/*.js $(1)/www/luci-static/resources/crowdsec-dashboard/
$(INSTALL_DATA) ./htdocs/luci-static/resources/crowdsec-dashboard/*.css $(1)/www/luci-static/resources/crowdsec-dashboard/
# JavaScript views
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/crowdsec-dashboard
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/crowdsec-dashboard/*.js $(1)/www/luci-static/resources/view/crowdsec-dashboard/
endef
define Package/luci-app-crowdsec-dashboard/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
/etc/init.d/rpcd restart
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache 2>/dev/null
echo "CrowdSec Dashboard installed."
}
exit 0
endef
# call BuildPackage - OpenWrt buildroot
$(eval $(call BuildPackage,luci-app-crowdsec-dashboard))