Skip to contentSkip to conversation

iptables: No chain/target/match by that name (detailed)

DISCUSSION Randy Grimshaw 3 participants 3 messages Jan 11, 2006 – Jan 12, 2006

lore
Share & tools
lore
#0 lore raw

I believe you need to specify the chain i.e.:
iptables -t filter -A INPUT -p icmp --icmp-type echo-request -m nth --every 2 -j DROP

<><Randy

<><Randall Grimshaw
Room 203 Machinery Hall
Syracuse University
Syracuse, NY 13244
315-443-5779
[email protected]

Quoted 1 line
Quoted 1 line
Quoted 1 line

"Amresh Kumar" <[email protected]> 1/11/2006 5:21:00 AM >>>

Hi,

I have successfully applied patch for "nth" module but when i am trying to add the following RULE for testing purpose:-

"iptables -A INPUT -p icmp --icmp-type echo-request -m nth --every 2 -j DROP"

It throws a message "iptables: No chain/target/match by that name".

The steps i have followed to apply the patch for "nth" are:-

1 Apply the the patch for "nth" using patch-o-matic. #cd /root/patch-o-matic-ng #KERNEL_DIR=/usr/src/kernels/linux-2.6.14.2 IPTABLES_DIR=/root/iptables-1.3.4 ./runme base
2 Recompile kernel
#cd /usr/src/kernels/linux-2.6.14.2
#make clean
#make menuconfig
#make bzImage
#make modules
#make modules_install
#make install
3.Reboot system with new linux-2.6.14.2
4. #cd /root/iptables-1.3.4
#make KERNEL_DIR=/usr/src/kernels/linux-2.6.14.2 #make install KERNEL_DIR=/usr/src/kernels/linux-2.6.14.2

I am trying it with kernel v2.6.14.2 and iptables v1.3.4. **One thing that i have noticed that ipt_nth.o ipt_nth.ko ipt_nth.mod.c ipth_nth.mod.o was not create during recompile of kernel*** Any comment

After,the above failure i have tried the another way to use "nth", add nth as a Module as follows:-

first store the " ipt_nth.h" to the "/usr/src/kernels/linux-2.6.14.2/include/linux/netfilter_ipv4/" directory then, i wrote a Makefile

---------------------------------------------------------------
obj-m += ipt_nth.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
-----------------------------------------------------------------------
then execute
#make
#modprobe ip_tables
#insmod ./ipt_nth.ko

It works.Now,i am able to use nth module.

So,please tell what i missed or did wrong in patch-o-matic procedure.

Thanks
Amresh Kumar

Quoted 120 lines

From: "Amresh Kumar" <[email protected]>
To: [email protected]
CC: [email protected]
Subject: Re: iptables: No chain/target/match by that name
Date: Mon, 09 Jan 2006 12:51:42 +0530
MIME-Version: 1.0
X-Originating-IP: [61.12.43.109]
X-Originating-Email: [[email protected]]
X-Sender: [email protected]
Received: from vishnu.netfilter.org ([213.95.27.115]) by bay0-mc12-f13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Sun, 8 Jan 2006 23:25:14 -0800
Received: from localhost ([127.0.0.1] helo=vishnu.netfilter.org)by vishnu.netfilter.org with esmtp (Exim 4.41 #1 (Debian))id 1EvrRf-0002mk-07; Mon, 09 Jan 2006 08:27:59 +0100
Received: from bay105-f19.bay105.hotmail.com ([65.54.224.29] helo=hotmail.com)by vishnu.netfilter.org with esmtp (Exim 4.41 #1 (Debian))id 1EvrRV-0002iu-Sufor <[email protected]>; Mon, 09 Jan 2006 08:27:50 +0100
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;Sun, 8 Jan 2006 23:21:42 -0800
Received: from 65.54.224.200 by by105fd.bay105.hotmail.msn.com with HTTP;Mon, 09 Jan 2006 07:21:42 GMT
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPt4iogl2abg+M=
X-OriginalArrivalTime: 09 Jan 2006 07:21:42.0918 (UTC)FILETIME=[572F9A60:01C614ED]
X-BeenThere: [email protected]
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: General discussion and user questions <netfilter.lists.netfilter.org>
List-Unsubscribe:
<https://lists.netfilter.org/mailman/listinfo/netfilter>,<mailto:[email protected]?subject=unsubscribe>
List-Archive: </pipermail/netfilter>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[email protected]?subject=help> List-Subscribe:
<https://lists.netfilter.org/mailman/listinfo/netfilter>,<mailto:[email protected]?subject=subscribe>
Errors-To: [email protected]
Return-Path: [email protected]

Hi,
Thanks for quick reply. My Iptables rule is enabled as a module. Yes i am loading the module for this i am doing

modprobe ip_tables
insmod ./ipt_nth.ko
Than after applying rule iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state
--state NEW -m nth --counter 0 --every 4 --packet 0 -j DNAT It is working fine

But iptables rule for Load Balancing with random is not working. still giving error
iptables: No chain/target/match by that name

Can i enable this rule in my kernel.....

Thanks....

Quoted 58 lines

--

From: "John A. Sullivan III" <[email protected]>
To: Amresh Kumar <[email protected]>
CC: [email protected]
Subject: Re: iptables: No chain/target/match by that name
Date: Sat, 07 Jan 2006 13:50:10 -0500
MIME-Version: 1.0
Received: from itza.net ([198.77.208.51]) by bay0-mc12-f10.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Sat, 7 Jan 2006 10:50:38 -0800
Received: from [192.168.223.201] (unverified [24.75.251.186]) by itza.net (ITZA Company Hosting Services - http://www.itza.net) with ESMTP id 14066248 for multiple; Sat, 07 Jan 2006 13:50:25 -0500
X-Message-Info: JGTYoYF78jHLwkyVEn2eatAFdoqg5YYBiazxjq0B+qw=
Return-Path: <[email protected]>
References: <[email protected]>
X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) X-Server: High Performance Mail Server - http://surgemail.com r=-670927196
X-Avast: Message is clean
X-IP-stats: Incoming Last 0, First 70, in=193, out=0, spam=0
X-External-IP: 24.75.251.186
X-OriginalArrivalTime: 07 Jan 2006 18:50:38.0487 (UTC) FILETIME=[40476270:01C613BB]

Quoted 3 lines · Amresh Kumar

Hi ,

I am using iptables rule for Load Balancing with random* or nth but i

am

Quoted 5 lines

getting the error

iptables: No chain/target/match by that name

iptables rule : iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m

state

Quoted 4 lines

--state NEW -m nth --counter 0 --every 4 --packet 0 -j DNAT --to-destination 192.168.0.5:80

iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW

-m

Quoted 8 lines

random --average 25 -j DNAT --to-destination 192.168.0.5:80

My kernel version is 2.6.9-5.0.3.EL
Iptable version = iptables v1.3.4

can anyone explain.

Thanks..

<snip>
Is it enabled in the kernel or as a module? If as a module, is it loaded? - John
--
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
[email protected]

Quoted 10 lines
Quoted 4 lines

If you would like to participate in the development of an open source enterprise class network security management system, please visit
http://iscs.sourceforge.net

_________________________________________________________________
How good are you in a Formula One car? Play now
http://server1.msn.co.in/sp05/tataracing/onlinegame.asp

_________________________________________________________________
Shah Rukh fan? Know all about the Baadshah of Bollywood. On MSN Search
http://server1.msn.co.in/profile/shahrukh.asp

#1 lore raw
Quoted 1 line · Randy Grimshaw

I believe you need to specify the chain i.e.:

You mean "table" (which is what you added) ?

Quoted 2 lines

iptables -t filter -A INPUT -p icmp --icmp-type echo-request -m nth --every 2 -j DROP

"-t filter" is assumed if not specified.

Quoted 4 lines
Quoted 4 lines

"iptables -A INPUT -p icmp --icmp-type echo-request -m nth --every 2 -j DROP"

It throws a message "iptables: No chain/target/match by that name".

Using kernel 2.6.15 I'm having problems too when compiling nth.

Actually, I'm seeing more things : 2.6.15 (vanilla) has NF functionality that POM doesn't recognize and offers to install a patch for (I thought pptp is an example).
Also, for example, in 2.4.31 I tried to patch for NOTRACK but POM says : no raw table. But I was't offered to install the raw table patch.

Gr,
Rob

#2 lore raw

Hi Amresh Kumar!
The PREROUTING and POSTROUTING chains exist only in nat or mangle tables. So add iptables -t nat or iptables -t mangle

Quoted 8 lines

iptables rule : iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth --counter 0 --every 4 --packet 0 -j DNAT --to-destination 192.168.0.5:80

iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m random --average 25 -j DNAT --to-destination 192.168.0.5:80

The above rules would be for the nat table.
HTH
Sorin