1

I'm trying to prevent loic attackes by using this command

iptables -A INPUT -p tcp --dport 80 -m hashlimit --hashlimit-upto 50/min \
--hashlimit-burst 500 --hashlimit-mode srcip --hashlimit-name http -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP

reference: How to prevent a LOIC (DDOS) attack?

I always got this error message:

iptables v1.3.5: Unknown arg `--hashlimit-upto'

What's causing it and how can I fix it?

Mely N
  • 13
  • 2
  • 1
    Could it be that `v1.3.5` does not yet support that option? Check your man page, please. Is this an older box? – Felix Frank Aug 13 '14 at 12:01
  • Thanks for the tip, I've updated to latest version which is v1.4.21, I'm still getting the error: iptables v1.4.21: unknown option "--hashlimit-upto" – Mely N Aug 14 '14 at 02:40

1 Answers1

2

You're using an ancient version of iptables which dates back to January 2006, and probably on a very old Linux distribution.

The problem is that the feature you were trying to use was added to iptables in 2008.

The solution is to update to a more modern Linux distribution.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940