SSH port modification recommandation but not in fail2ban conf?


In this page you say that it is better to change the SSH default port to another one and I’m totally agree with that.
But what about the default fail2ban config? Would we modify /etc/fail2ban/yunohost-jails.conf with:

enabled = true
port = <new_port>

Or maybe fail2ban directly read the sshd config file to guess the correct port?

Thank you.

No, you should indeed also change the ssh port in the fail2ban conf ideally.

1 Like

Thank you Aleks for the confirmation :wink:

Maybe it would be great to update the page in the “Modification SSH port” section?

Yes, and you can do this by clicking the ‘Edit’ button at the bottom left :wink:

Oh yes, completely forgot about this feature.

I will do that!

1 Like