I installed a fresh Ubuntu machine. Then I changed the ssh port which is no more 22 but 22111:
Then I have installed fail2ban:
apt-get install fail2ban -y cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local service fail2ban restart iptables -L
Then I try to SSH login from the ip 192.168.1.22. After few wrong login, fail2ban add the follow line to iptables.
-A fail2ban-ssh -s 192.168.1.22/32 -j REJECT --reject-with icmp-port-unreachable
After that, I try to login again with the right credential and I can login with no problem, from the IP 192.168.1.22
The iptables rule is still there.
Do I need additional configuration?