Advertisement
swaggboi

Untitled

Jun 21st, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | None | 0 0
  1. # sshd rate-limiting
  2. $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 22 -m state \
  3.             --state NEW -m recent --update --seconds 600 --hitcount 5 -j LOG \
  4.                 --log-prefix "sshd rate-limit: "
  5. $IP6T -A tcp_inbound -p TCP -s ::/0 --destination-port 22 -m state \
  6.             --state NEW -m recent --update --seconds 600 --hitcount 5 -j LOG \
  7.                 --log-prefix "sshd rate-limit: "
  8. $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 22 -m state \
  9.             --state NEW -m recent --update --seconds 600 --hitcount 5 -j DROP
  10. $IP6T -A tcp_inbound -p TCP -s ::/0 --destination-port 22 -m state \
  11.             --state NEW -m recent --update --seconds 600 --hitcount 5 -j DROP
  12. $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 22 -m state \
  13.             --state NEW -m recent --set
  14. $IP6T -A tcp_inbound -p TCP -s ::/0 --destination-port 22 -m state \
  15.             --state NEW -m recent --set
  16.  
  17. # sshd
  18. $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 22 -j ACCEPT
  19. $IP6T -A tcp_inbound -p TCP -s ::/0 --destination-port 22 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement