Files
Fail2Ban-Dashboard---NPM/healthcheck.sh
gitea c104e27506 Initial release: F2B Control Center v1.0
Fail2Ban + Nginx Proxy Manager dashboard in a single Docker container.

Features:
- Auto-ban via badbot, http-errors, npm-probe, manual-bans, recidive jails
- Web dashboard: live ban grid, log scanner, per-IP access log viewer
- iptables-nft banning (DOCKER-USER + INPUT chains)
- Optional Cloudflare WAF banning
- Optional AbuseIPDB threat scoring
- Two-tier IP management: whitelist (trusted) vs exempt (reviewed)
- Auto log-file detection via logwatch (no restart needed for new NPM hosts)
2026-02-20 18:59:56 +00:00

12 lines
331 B
Bash

#!/bin/bash
# Docker HEALTHCHECK — passes only if both fail2ban and dashboard are responding.
set -e
# Check fail2ban daemon is alive
fail2ban-client ping > /dev/null 2>&1 || exit 1
# Check dashboard HTTP endpoint is responding
curl -sf --max-time 5 "http://localhost:${PORT:-4000}/api/bans" > /dev/null 2>&1 || exit 1
exit 0