Iptables SSH brute-force protection Print

  • iptables, brute-force protection, ssh
  • 1

Some iptables rules that are useful to increase the overall security of a Linux server.

#SSH brute-force protection
/sbin/iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --set 
/sbin/iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 10 -j DROP  

#Protection against port scanning
/sbin/iptables -N port-scanning 
/sbin/iptables -A port-scanning -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s --limit-burst 2 -j RETURN 
/sbin/iptables -A port-scanning -j DROP


Kas see vastus oli kasulik?

« Tagasi

Powered by WHMCompleteSolution