When I try to run iptables -A control_in -p tcp --dport 22 -j ACCEPT
I get the error message iptables v1.4.20: unknown option "--dport"
. Everything I've found on the internet and serverfault relating to this message was due to people not specifying a protocol. However I am doing that (-p tcp
). I've also tried running it with multiple --verbose
options but I don't get any more info.
Edit: Michael Hampton's answer led me to the correct answer. It was a broken iptables install that was missing some libraries from /usr/lib/xtables. The --match
argument is redundant if iptables is given the -p
argument, except that it only complains about the missing libraries if given --match
.