Answer the question
In order to leave comments, you need to log in
How to fix iptables?
Hello.
I'm struggling with the old Linux kernel (2.4.19) with iptables version 1.2.2
This version is needed for one old software to work.
An error occurs when starting and configuring iptables through a script.
Gives an error:
As a result, I have a file /etc/sysconfig/iptables of the following form:
https://pastein.ru/t/OH
Here is the entire initial configuration script:
https://pastein.ru/t/3H
The error in line 285 is the second from the end "esac" command
According to the result, iptables does not work: it does not accept rules and does not write them to the /etc/sysconfig/iptables config
Help me figure it out!
Answer the question
In order to leave comments, you need to log in
The error in line 285 is the second "esac" command from the endWell, if you count the lines according to the posted script, then line 285 is
[ -e "$VAR_SUBSYS_IPTABLES" ] && restart
, and not "esac" at all. $IPTABLES -t mangle -P PREROUTING $policy \
&& $IPTABLES -t mangle -P POSTROUTING $policy \
$IPTABLES -t mangle -P PREROUTING $policy \
&& $IPTABLES -t mangle -P POSTROUTING $policy \
&& $IPTABLES -t mangle -P INPUT $policy \
&& $IPTABLES -t mangle -P OUTPUT $policy \
&& $IPTABLES -t mangle -P FORWARD $policy \
|| let ret+=1
;;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question