Sunday, 8 April 2012

ssh security measures

After a failed login attempt, refuse attempts to log in from that ip address for one minute:

$ iptables -A INPUT -p tcp -m state --syn --state NEW --dport 22 -m limit --limit 1/minute --limit-burst 1 -j ACCEPT

$ iptables -A INPUT -p tcp -m state --syn --state NEW --dport 22 -j DROP

Does this need to be re-specified on each restart?

No comments:

Post a Comment