How can i limit SSH login attempts per minute per IP ?I want to disable login attempts during 5 seconds after a failure. Is this possible ?I'm not talking about ban a user after parsing logs like Fail2ban.
SSH login attempts per minute per IP
ssh;iptables;login;pam;limit
Question 1This can be done with the module hashlimit.iptables -A INPUT -p tcp --dport 22 -m hashlimit \  --hashlimit-mode srcip --hashlimit-above 3/minute -j DROPQuestion 2Netfilter does not see login failures only connections. You need a tool (like Fail2ban) which is active on both levels. You could create a chain with blocked IPs and run a script after each login failure which would do something likeiptables -A blocked_ips -s $evil_ip -j DROPsleep 5iptables -D blocked_ips -s $evil_ip -j DROP