This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.78 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data