Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. /// SSH brute-force scan protection
  2. /sbin/iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --set
  3. /sbin/iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 10 -j DROP
  4.  
  5. /// ports scan protection
  6. /sbin/iptables -N port-scanning
  7. /sbin/iptables -A port-scanning -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s --limit-burst 2 -j RETURN
  8. /sbin/iptables -A port-scanning -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement