I am having an issue appending new rules to iptables in ubuntu Here is what I believe is the relevant info.

Rule appending:

iptables -A INPUT -p tcp --dport 1022 -j ACCEPT -m comment --comment "SSH"


iptables: No chain/target/match by that name.


iptables v1.4.4

uname -r


iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Anyone have this issue before?

  • 1
    Maybe you need to put the -j option at the end ? iptables -A INPUT -p tcp --dport 1022 -m comment --comment "SSH" -j ACCEPT -> I confirm, it works
    – Dom
    Feb 8, 2013 at 14:23
  • I tried that as well and it is still giving me the same error.
    – lotus
    Feb 8, 2013 at 14:41

1 Answer 1


Maybe you dont have the module comment compiled in your kernel, or loaded.

I copy & paste your line and it executes ok in my computer, debian wheezy, so is not a type error.

  • Really i only googled it. ;-)
    – Brigo
    Feb 8, 2013 at 14:59
  • Yea, I didn't even think that was a possibility. I never ran into a system that didn't have it enabled. I was making it more complicated than it needed to be.
    – lotus
    Feb 8, 2013 at 15:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .