Advertisement
Guest User

Untitled

a guest
Feb 27th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. iptables -N INSYNBAN
  2. iptables -A INSYNBAN -m recent --set --name INSYNBANCOUNTER
  3. iptables -A INSYNBAN -m recent --update --name INSYNBANCOUNTER --seconds 120 --hitcount 1 -j DROP
  4. iptables -N INSYNSRCLIMITER
  5. iptables -A INSYNSRCLIMITER -m recent --update --name INSYNBANCOUNTER --seconds 120 --hitcount 1 -j DROP
  6. iptables -A INSYNSRCLIMITER -m hashlimit --hashlimit-mode srcip --hashlimit-name insynlimiter --hashlimit 1/s --hashlimit-burst 10 --hashlimit-htable-size 4096 --hashlimit-htable-max 262144 -j RETURN
  7. iptables -A INSYNSRCLIMITER -m limit --limit 1000/m --limit-burst 1000 -j LOG --log-level 4 --log-ip-options --log-prefix "INSYN_SRC_LIMIT EXCEED: "
  8. iptables -A INSYNSRCLIMITER -j INSYNBAN
  9. iptables -A INPUT -p tcp --syn -m state ! --state RELATED,ESTABLISHED -j INSYNSRCLIMITER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement