Description
Fail2Ban is a daemon that bans hosts causing repeated authentication errors. It scans log files such as /var/log/auth.log and bans the IP addresses that make too many failed login attempts, by updating the system firewall to reject new connections from them for a configurable period. Out of the box it reads the logs of common services, including sshd and Apache, and it can be configured to read any log file and match any error pattern you choose. The project is clear about its limits: Fail2Ban reduces the rate of incorrect login attempts, but it cannot remove the risk that weak authentication presents, so the README recommends two-factor or public and private key authentication for services that need real protection. It supports IPv6 addresses since version 0.10. Fail2Ban is packaged for most Linux distributions and can be installed with the package manager, or from source on GitHub using Python 3.5 or later. Its documentation, including the fail2ban(1) manual page, the wiki and the developer documentation, is on the project website. The daemon is intended for system administrators who run servers exposed to the internet and want to slow down automated login attacks.…
Highlights
- Bans hosts after repeated failed logins
- Updates firewall rules for a set time
- Built-in filters for sshd, Apache and others
- Custom log files and patterns
- IPv6 support since version 0.10
- Installs from Linux package managers or source
Ratings & Reviews
No ratings yet
Be the first to rate Fail2ban.
People also visit
Fail2ban FAQ
What does Fail2Ban do?
It scans log files for repeated failed logins and bans the offending IP addresses by updating firewall rules for a set time.
Which services does it read by default?
Standard log files for services such as sshd and Apache, and it can be set up to read any log file.
Does it stop all login attacks?
No. The README says it reduces failed attempts but does not remove the risk from weak authentication, so two-factor or key-based login is recommended.
Is it free?
Yes. It is an open-source project on GitHub.
How do I install it?
Use your Linux distribution's package manager, or install from source with Python 3.5 or later.
Where is the documentation?
On the Fail2Ban website, including the fail2ban(1) manual, the wiki and developer documentation.
What are the best Fail2ban alternatives?
Popular alternatives to Fail2ban include IPBan Pro, Agent and Fail2Ban-Report. See all Fail2ban alternatives


