LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-31-2007, 07:17 AM   #1
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Rep: Reputation: 0
Smile "No chain/target/match by that name"


Hi all

I create simple firewall for Etch.
Kernel 2.6.22.5
Iptables 1.3.6
After that rule :
iptables -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT
I'v get this error:
"No chain/target/match by that name"

And:

iptables -t filter -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT

"No chain/target/match by that name"


lsmod:
ipt_recent
iptable_filter
ip_tables
x_tables

demseg | tail -f :
eth0: no IPv6 routers present
ip_tables: (C) 2000-2006 Netfilter Core Team

What can I do with it???
Best regards
GGery
 
Old 08-31-2007, 08:48 AM   #2
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
you don't need to specify a protocol; drop the "-p tcp"

then anything you permit via other rules (eg, the first tcp/80 packet to a web server, an icmp type 8[echo], a udp/53 packet to a dns server) will have it's established traffic the other way allowed.

-c
 
Old 08-31-2007, 09:26 AM   #3
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
"No chain/target/match by that name"

Hello

Sorry, same error
This is clean Debian net install and I compile kernel from default config.

debian:~# iptables -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT
iptables: No chain/target/match by that name
debian:~# iptables -A INPUT -i eth0 -m state --state ESTABLISHED -j ACCEPT
iptables: No chain/target/match by that name

I don't know maybe it's module problem ?

BR
 
Old 08-31-2007, 09:28 AM   #4
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
what do you get from "iptables -L"?
-c
 
Old 08-31-2007, 09:47 AM   #5
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
"No chain/target/match by that name"

I just start configure my firewall.

This is 3 rule from my script:

iptables -F -t filter
iptables -F -t mangle
iptables -A INPUT -p tcp -i eth0 -m state --state ESTABLISHED -j ACCEPT

iptables -L -n:

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


Maybe I must first DROP all but I want to restart firewall from SSH.
GG
 
Old 09-01-2007, 07:42 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Iptables misses the state module. It complains about "-m state". The module you are missing is ipt_state.

You may try to modprobe ipt_state, but if that module isn't there you might have to re-install iptables with the correct modules. Honestly I never had this problem with Debian, so I can't tell you what to do if it is missing.

jlinkels
 
Old 09-01-2007, 02:13 PM   #7
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
"No chain/target/match by that name"

Thanks jlinkels

I have this error:
FATAL: Module ipt_state not found.

I must reconfigure this packages form dpkg or from source?
GG
 
Old 09-02-2007, 08:32 PM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I take it /lib/iptables/libipt_state.so is not available on your system.

NO idea how to get it there. I compiled my own kernel as well, but I did not add/remove anything in the NETFILTER section. It just worked right.

AFAIK installing iptables only installs the user land part of iptables, the real thing runs in the kernel and during kernel compilation the module should have been compiled.

What if you install a pre-compiled Etch kernel 2.6.18?

jlinkels
 
Old 09-03-2007, 04:28 AM   #9
GGery
LQ Newbie
 
Registered: Mar 2006
Location: East Europe
Distribution: debian ubuntu freebsd
Posts: 14

Original Poster
Rep: Reputation: 0
With default kernel from netinstall 4.0rc1 CD every think is OK.
ipt_state loaded with ip_conntrack.

I’ve compiled this morning kernel 2.6.22.6 with patch-o-matic-ng and iptables source 1.3.8
But this not working. I use default .config from boot.

GG
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables: No chain/target/match by that name - with 2.6.17.7 tp11235 Linux - Kernel 10 03-24-2010 02:15 AM
kernel update and "iptables: No chain/target/match by that name" thewtex Linux - Networking 4 04-03-2007 06:10 AM
no chain/target match by that name slang830 Linux - Security 2 03-19-2007 09:26 AM
"iptables: No chain/target/match by that name" error PennyroyalFrog Linux - Security 2 11-28-2004 01:57 PM
no chain/target/match creznedmick Linux - Networking 1 03-08-2004 04:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration