You are not logged in.

#1 2008-07-23 17:37:29

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

iptables problem

Why can't I append this rule ?And what's the problem..Here is the output http://pastebin.com/m47eecc65 Thanks in advance!

Last edited by Insane-Boy (2008-07-23 17:55:54)

Offline

#2 2008-07-23 19:03:55

sph
Member
Registered: 2008-05-01
Posts: 63
Website

Re: iptables problem

From http://www.faqs.org/docs/iptables/commonproblems.html:

Another error that you may get when running iptables is the following error.

iptables: No chain/target/match by that name

This error tells us that there is no such chain, target or match. This could depend upon a huge set of factors, the most common being that you have misspelled the chain, target or match in question. Also, this could be generated in case you are trying to use a match that is not available, either because you did not load the proper module, it was not compiled into kernel or iptables failed to automatically load the module. In general, you should look for all of the above solutions but also look for misspelled targets of some sort or another in your rule.

So, do not forget to do the following:

/etc/rc.d/iptables start

And use lsmod to check if the relevant modules are loaded for the iptables flags and chains, e.g.:

ipt_REJECT
ipt_LOG
ipt_MASQUERADE
iptable_nat
iptable_filter
ip_tables

Offline

#3 2008-07-24 14:13:14

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

Re: iptables problem

All modules are loaded but i still cant append the rule.

Offline

#4 2008-07-24 14:19:17

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: iptables problem

is the only rule or is a part from a script?


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2008-07-24 14:46:56

nj
Member
Registered: 2007-04-06
Posts: 93

Re: iptables problem

What chains do you have?

Run iptables -L

Offline

#6 2008-07-25 09:42:06

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

Re: iptables problem

It's an separate rule, not a script.I've got no chains http://pastebin.com/m5a962943

Offline

#7 2008-07-26 17:10:00

_AA_
Member
From: Maidstone, UK
Registered: 2008-07-14
Posts: 19
Website

Re: iptables problem

[root@iNsAnE devil]# iptables -A INPUT -p tcp --destination-port 80 -j ACCEPT
iptables: No chain/target/match by that name

Try:

iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT

What you should have:

iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
... other incoming rules allowing only syn packets.

Offline

#8 2008-07-26 18:31:43

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

Re: iptables problem

Offline

#9 2008-07-26 18:59:45

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: iptables problem

@_AA_
those commands are identical.
iptables -A INPUT == iptables -t filter -A INPUT

from iptables manual

filter:
                  This  is  the default table (if no -t option is passed).  It
                  contains the built-in chains INPUT (for packets destined  to
                  local  sockets),  FORWARD  (for packets being routed through
                  the box), and OUTPUT (for locally-generated packets).

for me is working.

[root@laptop wonder]# lsmod | grep ip
iptable_filter          2944  1 
ip_tables              11536  1 iptable_filter
x_tables               13188  2 xt_tcpudp,ip_tables

maybe this will help

Last edited by wonder (2008-07-26 19:41:44)


Give what you have. To someone, it may be better than you dare to think.

Offline

#10 2008-07-26 19:33:31

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

Re: iptables problem

@wonder you solved my problem .. there was a missing module called xt_tcpudp smile Thanks

Offline

Board footer

Powered by FluxBB