Files
Fail2Ban-Dashboard---NPM/fail2ban/action.d/webhook.conf
gitea dd7f8dd1a2 Initial release: F2B Control Center v1.0
Dockerized Fail2Ban + dashboard for Nginx Proxy Manager.

- Single-container image (fail2ban + Node.js + supervisord)
- Pre-built NPM filters: badbot, http-errors, npm-probe, manual-bans
- Web dashboard with live ban feed, log scanner, AbuseIPDB integration
- Configurable via environment variables and .env file
- Persistent volumes for config and ban history
- Webhook support for ban event notifications
- README, .gitignore, MIT license

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 14:40:59 +00:00

38 lines
1.5 KiB
Plaintext

# ── F2B Control Center — webhook action ──────────────────────────────────────
#
# Optional fail2ban action that POSTs a JSON payload to a webhook URL on
# ban and unban events. Useful for Discord, Slack, n8n, or any HTTP endpoint.
#
# USAGE:
# Set WEBHOOK_URL in your .env file.
# Then add to any jail in jail.local:
#
# action = %(action_)s
# webhook[url="%(webhook_url)s"]
#
# And in [DEFAULT]:
# webhook_url = YOUR_WEBHOOK_URL
#
# This action is NOT enabled by default. The dashboard's ban webhook is
# handled separately via the WEBHOOK_URL environment variable in server.js.
# ─────────────────────────────────────────────────────────────────────────────
[Definition]
# Variable: webhook URL (set via jail.local or override)
webhook_url = %(url)s
actionban = curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"action":"ban","ip":"<ip>","jail":"<name>","failures":<failures>,"ts":"'$(date -u +%%Y-%%m-%%dT%%H:%%M:%%SZ)'"}' \
"%(webhook_url)s" || true
actionunban = curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"action":"unban","ip":"<ip>","jail":"<name>","ts":"'$(date -u +%%Y-%%m-%%dT%%H:%%M:%%SZ)'"}' \
"%(webhook_url)s" || true
[Init]
name = default
url =