Hi, AFAIK, everything you feed to iptables-restore is given as arguments to "/sbin/iptables". Thus, having "echo > 0 /proc/sys/net/ipv4/ip_forward" in the iptables.rules file should leads to the execution of "/sbin/iptables echo > 0 /proc/sys/net/ipv4/ip_forward" which should normally give something like :
# /sbin/iptables echo > 0 /proc/sys/net/ipv4/ip_forward Bad argument `echo' Try `iptables -h' or 'iptables --help' for more information. Thus, I suggest you remove the "echo > 0 /proc/sys/net/ipv4/ip_forward" line from your iptables.rules file and that you put it in a shell script (as opposed to an iptables-restore script). I also suggest you swap the "0" and the ">" sign. Reason is that the effect of your command is to write a new line in file "0" and in file "/proc/sys/net/ipv4/ip_forward", as opposed to the - I suppose - wanted behavior, ie. to write character "0" to file "/proc/sys/net/ipv4/ip_forward". Best regards, Tommy. ----- Original Message ----- From: "Ron Darling" <[EMAIL PROTECTED]> To: "Netfilter Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 11:59 AM Subject: echo Error > I am setting up a Firewall for my internal network at my home office. I am > using several books to help. One of the books has a script to use to > perform a basic setup of IPTables. The book describes creating a file with > the script in it. Load the script using the command: > > iptables-restore < /etc/iptables.rules > > When I issue this command I receive error: 'Bad Argument 'echo' > > The first line of script is: > > echo > 0 /proc/sys/net/ipv4/ip_forward > > The path and file is valid for ip_forward. > > What could be causing this error ? > > Thanks for the help so far. You folks have been right on the money. > > Ron Darling > President Ix.sys, Inc. > http://www.ixsys.com > [EMAIL PROTECTED] > 817.377.0925 >