To find the configuration settings for ssh you will need to edit the following file
vi /etc/fail2ban/jail.localOnce you are in the file you will need to locate the ssh-iptables section. It should look similar to the following:
[ssh-iptables] enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=root, [email protected]] logpath = /var/log/secure maxretry = 5If you wish to change the default ssh port on your server then you can also change fail2ban to listen to the custom port. Simply replace port=ssh with the ssh port number eg.
port=123