Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"

Error:

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

Version:

iptables v1.4.4

uname -r

2.6.18-028stab094.3

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
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 '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

1 Answer 1

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

 
discard

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.