||This article's use of external links may not follow Wikipedia's policies or guidelines. (November 2012)|
||This article's lead section may not adequately summarize key points of its contents. (November 2012)|
|Original author(s)||Cyril Jaquier|
|Developer(s)||Cyril Jaquier, Arturo 'Buanzo' Busleiman|
|Stable release||0.8.7.1 / July 31, 2012|
Fail2ban is an intrusion prevention framework 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).
Fail2ban operates by monitoring log files (e.g. /var/log/pwdfail, /var/log/auth.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 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 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 fails to protect against a distributed brute force attack.
- There is no IPv6 support. If your provider automatically sets it up, Fail2ban will not work.
See also 
- DenyHosts. "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."
- Stockade (software), a rate-limiting approach to spam mitigation.
- OSSEC, an Open Source Host-based intrusion detection system.
Articles highlighting Fail2ban 
- PC Professionell: "Fail2ban - Sicherheit für Linux-Server"
- Gazeta IT: "Obrona przed namiętnymi nieletnimi"
- "Tip of the trade: fail2ban"
- howtoforge: "Preventing Brute Force Attacks With Fail2ban On Debian Etch"
- howtoforge: "Preventing Brute Force Attacks With Fail2ban On OpenSUSE 10.3"
- Art Of The Web: "Fail2ban HOWTO"
- Debian Administration: "Keeping SSH access secure
- Debian Package a Day: "Fail2ban: an enemy of script-kiddies"
- Defending against brute force ssh attacks
- Linux Magazin: "Unbestechlicher Türsteher"
- Setting up a longer ban for repeat offenders by monitoring the fail2ban logfile itself
- Requirements - Fail2ban
- Features - Fail2ban
- MANUAL 0 8 - Fail2ban
- Using fail2ban to Block Brute Force Attacks | MDLog:/sysadmin
- Debian Package of the Day » Blog Archive » Fail2ban: an enemy of script-kiddies
- Some users do not see an alternative solution at present: SLAC Computer Security of Stanford simply states in their recommendations, "Use fail2ban to block ssh and Apache dictionary attacks" "Cyber Security Awareness Month Day 19 - Linux Tips". SLAC Computer Security. 2007-10-19. Retrieved 2008-01-15.[dead link]
- Timme, Falko (2007-10-08). "Preventing Brute Force Attacks With Fail2ban On OpenSUSE 10.3". Retrieved 2007-11-14.