Install using a package manager - APT, Yum, etc.
apt install fail2ban
The main config file is /etc/fail2ban/jail.conf
. Create a copy to make modifications in to prevent changes from being overridden during future updates.
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local