LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-23-2009, 07:20 PM   #1
serpentor
LQ Newbie
 
Registered: Jan 2009
Posts: 3

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


I'm consistently getting this error:

Code:
/etc/cron.hourly/portflush:

iptables: No chain/target/match by that name
I read http://www.faqs.org/docs/iptables/commonproblems.html and some of the other threads here, but I'm not sure what I'm looking at.

The output of sudo /sbin/iptables -t filter -L is
Code:
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         
DROP       all  --  anywhere             81.189.52.37        
DROP       all  --  anywhere             214.109.56.59.broad.fz.fj.dynamic.163data.com.cn
I'm not sure how to sort out whether the solution is to fix a module (er, um, uh, huh?) or to ditch a rule or what. Any ideas? This is kind of feeling greek to me right now.

I tried manually running /etc/cron.hourly/portflush, but got an error:

/etc/cron.hourly/portflush: line 10: iptables: command not found

Line 10 isn't especially illuminating:
$IPTOOL -F $PORTSENTRY_CHAIN

It seems like $IPTOOL isn't defined anywhere. I'm not sure where or how to go about solving that, though.

Last edited by serpentor; 01-23-2009 at 07:33 PM. Reason: clarification
 
Old 01-24-2009, 11:48 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
could you post the script?

Last edited by repo; 01-24-2009 at 11:53 AM.
 
Old 02-03-2009, 01:10 PM   #3
serpentor
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
/etc/cron.hourly/portflush

Quote:
Originally Posted by repo View Post
could you post the script?
Here's the script:

Code:
#!/bin/sh

source /etc/sysconfig/portsentry

# This will flush the PORTSEN rules from your firewall tool (ipchains or
# iptables) every hour if CLEAR_CHAIN is set to "1" in the
# /etc/sysconfig/portsentry file 
if [ "$CLEAR_CHAIN" = "1" ]
then
	$IPTOOL -F $PORTSENTRY_CHAIN
	rm -f /var/log/portsentry/*blocked*
fi

exit
I did address the $IPTOOL error, but i definitely get the same error: "iptables: No chain/target/match by that name" when I run the script at the command line, too.

Any ideas?
 
Old 02-04-2009, 04:25 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
that is because portsentry is not creating the chain that iptables is trying to flush.
 
Old 02-05-2009, 10:02 AM   #5
serpentor
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
That makes a lot of sense. Is there a right way to address this?
 
  


Reply

Tags
iptables



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
iptables: No chain/target/match by that name qanopus Linux - Networking 6 01-04-2009 09:10 PM
kernel update and "iptables: No chain/target/match by that name" thewtex Linux - Networking 4 04-03-2007 06:10 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 - Server

All times are GMT -5. The time now is 05:36 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