What is Fail2ban?
Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address. These rules can be defined by the user. Fail2ban can read multiple log files such as sshd or Apache web server ones.
Is Fail2ban free software?
Fail2ban is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
What do you need to run Fail2ban?
Take a look at Requirements section
Are there RPM/DEB packages for Fail2ban?
Sure. Please take a look at Downloads section
How can I install Fail2ban from a RPM/DEB package?
If you are using rpm:
rpm -ivh fail2ban-X.X.X.rpm
If you are required to install a src.rpm (source package) please follow these instructions:
rpm --rebuild fail2ban-X.X.X.src.rpm
After that, binary rpm will be placed at /usr/src/RPM/RPMS/ix86
rpm -ihv /usr/src/RPM/RPMS/ix86/fail2ban-X.X.X.rpm
Please check that your PATH is /usr/src/RPM/RPMS/ix86/ before doing anything else.
If you want to install Fail2ban from a .deb package:
dpkg -i fail2ban-X.X.X.deb
¿What is the main configuration file for Fail2ban?
Fail2ban configuration process is rather simple. There is only one configuration file, where Fail2ban can be whole configurated, this file is located at: /etc/fail2ban.conf
We are able to edit this file using any editor we want: vim, emacs, joe, ae...
Configuration file must be edited by root