Stop SSH scanning with iptables
Basically, you define in iptables your local nets and accept SSH automatically: -A INPUT -p tcp --dport 22 -s -j ACCEPT (repeat as necessary) And then you define a block for repeated attempts for others: iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH iptables -A INPUT -p ...