Below is how to install and configure Fail2Ban for Zimbra. In this guidance, I use CentOS. Please adjust python-pip version if using another OS
1. Install pip
yum install python3-pip
2. Install dependencies required by Fail2Ban
pip3 install pyinotify pip3 install dnspython
3. Download and extract Fail2Ban
cd /tmp/ wget -c https://github.com/fail2ban/fail2ban/archive/0.9.4.tar.gz
4. Install Fail2Ban
tar -xvf 0.9.4.tar.gz cd fail2ban-0.9.4 python3 setup.py install
5. Copy Fail2Ban service to systemd
cp files/fail2ban.service /usr/lib/systemd/system/
6. Adjust bin location on Fail2Ban service
vi /usr/lib/systemd/system/fail2ban.service
Adjust the following lines. Change /usr/bin become /usr/local/bin