Jump to content

Fail2ban

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Birthnight (talk | contribs) at 18:11, 27 March 2016 (Changed the word "which" to "that" because it is grammatically correct.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Fail2ban
Original author(s)Cyril Jaquier
Developer(s)Cyril Jaquier, Yaroslav Halchenko, Daniel Black, Steven Hiscocks, Arturo 'Buanzo' Busleiman et al.
Initial release2004; 20 years ago (2004)
Stable release
0.9.4 / March 8, 2016; 8 years ago (2016-03-08)
Repository
Operating systemUnix-like
TypeIntrusion prevention
LicenseGPLv2+
Websitewww.fail2ban.org

Fail2ban is an intrusion prevention software framework that protects computer servers from brute-force attacks.[1] 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.

Functionality

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:[2] 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.[3] 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[4]

Shortcomings

  • Fail2ban fails to protect against a distributed brute-force attack.
  • There is no IPv6 support. If a provider automatically sets it up, Fail2ban will not work.[5]
  • There is no interaction with application-specific APIs/AGIs.

See also

  • DenyHosts, a log-based intrusion prevention security tool
  • Stockade, a rate-limiting approach to spam mitigation.
  • OSSEC, an open-source host-based intrusion detection system.

References

  1. ^ serverwatch.com (2006-08-15). "Tip of the Trade: Fail2ban".
  2. ^ ducea.com (2006-07-03). "Using fail2ban to Block Brute Force Attacks".
  3. ^ fail2ban.org. "Features - Fail2ban".{{cite web}}: CS1 maint: numeric names: authors list (link)
  4. ^ Timme, Falko (2007-10-08). "Preventing Brute Force Attacks With Fail2ban On OpenSUSE 10.3". Retrieved 2007-11-14.
  5. ^ "IPv6 support master plan". Github. Retrieved 21 January 2016.