fail2ban_ssh_config
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
Enabled - represents if the ssh protection is on or off
filter - represents directory in which the configuration file can be found. E.g /etc/fail2ban/filter.d/sshd.conf
fail2ban_ssh_config.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1