3.7 KiB
fail2ban-manager
An extensible CLI tool for managing fail2ban.
Introduction
Source Code hosted on my Forgejo instance. Registration is enabled for the public with GitHub via Authentik.
Any issues and feature requests can be submitted here on GitHub.
This tool is designed to make managing fail2ban easier without the need to edit configuration files. It is designed to be extensible via plugins, and easy to use.
Working with Jails
Plugins
Cloudflare
Ban an IP address using IP Rules in Cloudflare WAF. Jails are configured create rules in a specific DNS zone. Bans are cached in a database for fail2ban's check action to use.
Notes | |
---|---|
Typer generated docs | Link |
Provided via | Officicial SDK |
Variable | Purpose |
---|---|
CLOUDFLARE_EMAIL |
Email address for Cloudflare account |
CLOUDFLARE_API_TOKEN |
Token with permissions to manage IP Rules |
- Enable the Cloudflare plugin
f2bm plugin enable cloudflare
f2bm cloudflare create-zone 11111111111111111111111111111111 example.com
Plugin: Hetzner
Whitelist ip addresses in the Hetzner cloud firewall, and bulk whitelist Cloudflare IP addresses.
Notes | |
---|---|
Typer generated docs | Link |
Provided via | Officicial SDK |
- Enable the Hetzner plugin
f2bm plugin enable hetzner
- Create an API Token
Plugin: Telegram
Send a message to a Telegram chat. Custom messages per-jail are supported as well as seperate groups for each jail.
Notes | |
---|---|
Typer generated docs | Link |
Provided via | Rest API |