-1

Doing this command:

iptables -I INPUT -d xxx.xxx.xxx.xxx -p tcp --dport 80 -m string --to 70 \ --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP

I got this error on ssh console: "bad argument (--algo)". How can solve this?

veriu
  • 3
  • 1

1 Answers1

2

It should be:

iptables -I INPUT -d xxx.xxx.xxx.xxx -p tcp --dport 80 -m string --to 70 \
--algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP

or:

iptables -I INPUT -d xxx.xxx.xxx.xxx -p tcp --dport 80 -m string --to 70 --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP

The backslash (\) is used when you want to write a shell command on multiple lines.

quanta
  • 51,413
  • 19
  • 159
  • 217