LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   iptables: no chain/target/match by that name (http://www.linuxquestions.org/questions/linux-server-73/iptables-no-chain-target-match-by-that-name-871659/)

raducu1605 03-29-2011 03:32 AM

iptables: no chain/target/match by that name
 
I'm getting this error when running ./rc.firewall (Fedora 13)

RC.FIREWALL is very simple as follows:


Code:

#!/bin/bash
IPTABLES="sbin/iptables"
MODPROBE="/sbin/modprobe"

LOG_LEVEL="notice"
LOGGING="yes"

logger -p local6.$LOG_LEVEL -t firewall "Starting firewall ..."

$MODPROBE ip_conntrack_ftp
$MODPROBE ipt_LOG

$IPTABLES -F
$IPTABLES -X
$IPTABLES -Z

$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP

$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT

$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -A INPUT -p icmp -j ACCEPT
$IPTABLES -A OUTPUT -p icmp -j ACCEPT

pls, help

chrism01 03-29-2011 07:47 PM

Just run

Code:

iptables -L
which should show you which tables/chains are avail on F13.

Also, I'd amend
Code:

IPTABLES="sbin/iptables"

# to this
IPTABLES="/sbin/iptables"


carltm 03-29-2011 08:18 PM

Try running "bash -x rc.firewall" which will let you see which
line in the script is causing the problem. Post the output if
you can't figure out what is happening.

fakie_flip 01-26-2012 04:53 PM

Also, it's better to use variables that are not all in caps. Those are reserved for enviornment variables.


All times are GMT -5. The time now is 07:31 AM.