Fail2ban is a free and open-source firewall software solution that protects your server from brute-force login attacks. It is an intrusion prevention framework that continuously monitors log files of different services, detects failed authentication, and blocks attacks using firewalld or iptables. Fail2ban blocks the attacker’s IP permanently or temporarily via the configuration file. It also sends you an email notification whenever an attack is occurring. It is primarily used for SSH attacks, however, it can be configured to work for any service that uses log files.