# Fail2Ban

> Ban hosts that cause multiple authentication errors

Source: https://talira.ai/catalog/fail2ban-w9h3r33p
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [security / host intrusion detection](https://talira.ai/categories/security/host-intrusion-detection)
- Platforms: linux[^3]
- Licence: GPL-2.0-or-later[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^3]
- Backed by: [Fail2Ban](https://talira.ai/orgs/fail2ban.md)

Fail2Ban is a daemon that scans log files such as `/var/log/auth.log` and bans IP addresses that show malicious signs, like too many failed logins, by adding firewall rules that reject their connections for a configurable time. It comes with filters and jails for many standard services (sshd, Apache and more) and can be pointed at any log file and any error pattern, reading logs by polling, inotify or the systemd journal. It matches IPv6 addresses as well as IPv4, and is run and inspected with `fail2ban-client`. It's written in Python, GPLv2+, and packaged by most Linux distributions.

## Links

- GitHub: https://github.com/fail2ban/fail2ban
- Docs: https://fail2ban.readthedocs.io/

## Problems it solves

- my server's SSH log is full of brute-force login attempts from random IPs
- automatically block an IP address after a few failed logins
- bots keep hammering the login page of my self-hosted app
- temporarily ban hosts that trigger errors in any log file I choose
- add firewall rules automatically when someone attacks my mail server
- cut down the noise of password-guessing attacks on my VPS
- ban abusive IPv6 addresses as well as IPv4
- protect my home server's exposed services without a commercial security product

## Features

- scans log files and bans IPs with too many failures
- updates firewall rules to reject banned IPs for a configurable time
- ready-made filters for standard services such as sshd and Apache
- custom filters for any log file and any error pattern
- IPv6 matching since v0.10
- polling, pyinotify or systemd journal backends
- fail2ban-client to control and inspect jails

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 0.89, adoption 0.86, momentum 0.61, community 0.99, backing 0.30, extensibility 0.20.

- last commit today
- 43 commits in the last 90 days
- latest release 1.1.1 3 months ago
- 19.1k GitHub stars
- 304 contributors
- accepts sponsorship (Github, Custom, Liberapay)
- has a company behind it

## Alternatives

- [CrowdSec](https://talira.ai/catalog/crowdsec-vd2qswsz.md): Open-source IDS/IPS, WAF and bot detection with a crowdsourced blocklist of malicious IPs

## Sources

[^1]: https://github.com/fail2ban/fail2ban/blob/master/COPYING (checked 23 Nov 2026)
[^2]: https://github.com/fail2ban/fail2ban/blob/master/fail2ban/server/server.py (checked 23 Nov 2026)
[^3]: https://github.com/fail2ban/fail2ban/blob/master/README.md (checked 23 Nov 2026)
