Change ssh port and fail2ban

Hi. I change ssh port with commands

Open ssh in port 4078
$HESTIA/bin/v-add-firewall-rule ACCEPT 4078 tcp SSH

Change SSH port to 4078
sed -i ‘s/Port 22/Port 4078/g’ /etc/ssh/sshd_config

service sshd restart

What I need to change in fail2ban for guard of ssh on port 4078 ?

Nothing. Fail2 ban rules will work out of the box since the log file that fail2ban reads will still write identical lines in the other port.

You may though check the fail2ban filter

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.