0

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?

2
  • 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
2

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.

2
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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