I am using ubuntu 16.04, is there a way to lock a IP address for 10 minutes after 3 Failed Login attempts to avoid brute forcing.
By did serching internet, I found a method can lock root use for temporary, by add this content in /etc/pam.d/common-auth file and restart the SSH service.
auth required pam_tally2.so onerr=fail deny=3 unlock_time=600 audit
$ sudo systemctl restart sshd
but it doesn't work. Is there a way to lock a IP 10min atfer over 3 Failed Login attempts?