This article needs additional citations for verification. (October 2014) (Learn how and when to remove this template message)
Fail2Ban is an intrusion prevention software framework that protects computer servers from brute-force attacks. Written in the Python programming language, it is able to run on POSIX systems that have an interface to a packet-control system or firewall installed locally, for example, iptables or TCP Wrapper.
|Original author(s)||Cyril Jaquier|
|Developer(s)||Cyril Jaquier, Yaroslav Halchenko, Daniel Black, Steven Hiscocks, Arturo 'Buanzo' Busleiman et al.|
0.10.0 / August 9, 2017
Fail2Ban operates by monitoring log files (e.g. /var/log/auth.log, /var/log/apache/access.log, etc.) for selected entries and running scripts based on them. Most commonly this is used to block selected IP addresses that may belong to hosts that are trying to breach the system's security. It can ban any host IP address that makes too many login attempts or performs any other unwanted action within a time frame defined by the administrator. Fail2Ban is typically set up to unban a blocked host within a certain period, so as to not "lock out" any genuine connections that may have been temporarily misconfigured. However, an unban time of several minutes is usually enough to stop a network connection being flooded by malicious connections, as well as reducing the likelihood of a successful dictionary attack.
Fail2Ban can perform multiple actions whenever an abusive IP address is detected: update Netfilter/iptables or PF firewall rules, TCP Wrapper's hosts.deny table, to reject an abuser's IP address; email notifications; or any user-defined action that can be carried out by a Python script.
The standard configuration ships with filters for Apache, Lighttpd, sshd, vsftpd, qmail, Postfix and Courier Mail Server. Filters are defined by Python regexes, which may be conveniently customized by an administrator familiar with regular expressions. A combination of a filter and an action is known as a "jail" and is what causes a malicious host to be blocked from accessing specified network services. As well as the examples that are distributed with the software, a "jail" may be created for any network-facing process that creates a log file of access.
Fail2Ban is similar to DenyHosts [...] but unlike DenyHosts which focuses on SSH, Fail2Ban can be configured to monitor any service that writes login attempts to a log file, and instead of using /etc/hosts.deny only to block IP addresses/hosts, Fail2Ban can use Netfilter/iptables and TCP Wrappers /etc/hosts.deny.— Falko Timme
- Fail2Ban fails to protect against a distributed brute-force attack.
- There is no interaction with application-specific APIs/AGIs.
- "fail2ban: Daemon to ban hosts that cause multiple authentication errors". 11 November 2017 – via GitHub.
- serverwatch.com (2006-08-15). "Tip of the Trade: Fail2Ban".
- ducea.com (2006-07-03). "Using Fail2Ban to Block Brute Force Attacks".
- fail2ban.org. "Features - Fail2Ban".
- Timme, Falko (2007-10-08). "Preventing Brute Force Attacks With Fail2Ban On OpenSUSE 10.3". Retrieved 2007-11-14.