Menu Close

iptables v1.4.2 trouble

So I’ve been playing a lot with iptables again at work. I’ve worked out a couple different rules for trying to limit how many hack attempts actually get through to the box, and one of the steps I took was to craft up two rules to limit the time that someone can connect to the box via ssh. I typed it all in and got the following error message.

iptables v1.4.2: Unknown arg `(null)’
Try `iptables -h’ or ‘iptables –help’ for more information.

Okay so that not a helpful error message at all. So I went back through my entered line checking for typos, errant keystrokes, or just plain issues in my args. Nothing. So maybe it wants to know the protocol. So I added in a -p tcp. Nope no dice. I re-arranged the order of the statement a little. So I turned to illgoogleitforyou.com.

The answer? Upgrade to v1.4.4. The other answer, 1.4.2 does not recognize the –days arg. You have to use –weekdays.