User Tools

Site Tools


fail2ban_ssh_config

To find the configuration settings for ssh you will need to edit the following file

vi /etc/fail2ban/jail.local
Once 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 = 5
If 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

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki