Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '13 at 14:23
I tried that as well and it is still giving me the same error. – lotus Feb 8 '13 at 14:41
up vote 2 down vote accepted

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.

share|improve this answer
Genius, that was it! Thank you. – lotus Feb 8 '13 at 14:43
Really i only googled it. ;-) – Brigo Feb 8 '13 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 '13 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.