Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Jan 25th, 2013  |  syntax: None  |  size: 0.57 KB  |  views: 1,363  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ipset -exist create blackhole hash:ip timeout 600
  3. -A INPUT -m set --match-set blackhole src -j DROP
  4. -A INPUT -p tcp -m tcp --dport 22 -j SSH-ALL
  5. -A SSH-ALL -p tcp -m recent --set --name SSH --rsource
  6. -A SSH-ALL -p tcp -m recent --update --seconds 180 --hitcount 8 --name SSH --rsource -j SSH-BLOCKED
  7. -A SSH-ALL -p tcp -j ULOG --ulog-nlgroup 1 --log-prefix "Accepted-ssh Event: "
  8. -A SSH-ALL -p tcp -j ACCEPT
  9. -A SSH-BLOCKED -p tcp -j ULOG --ulog-nlgroup 1 --log-prefix "Blocked-ssh Event: "
  10. -A SSH-BLOCKED -p tcp -j SET --add-set blackhole src
  11. -A SSH-BLOCKED -p tcp -j DROP
clone this paste RAW Paste Data