try running it one command at a time. this way you can determine which line has problems.
it maybe not necessary be kernel problem. it maybe that you are using different versions of the iptables tools and the module resolution is different for both. good luck! On Wed, Jun 18, 2003 at 11:17:28AM +0800, Gerald Abrigo wrote (wyy sez): > Hello everyone > > I know anybody can answer my probs regarding scripts on IPtables. > Im running RH9 kernel 2.4.20-8.IPTABLES is enable, Network service is > running but when I issue sh command or run this script manually, the system > display an error message = > > no such file or directory /proc/sys/net/upv4/ip_forward > iptables: Bad Policy Name > and so on....... > > heres the script: > > #!/bin/sh > IPTABLES=/sbin/iptables > #Enable forwarding > echo "1" > /proc/sys/net/ipv4/ip_forward > $IPTABLES -P INPUT ACCEPT > $IPTABLES -F INPUT > #The following three lines are not necessary for NAT, but provide some > security > #by blocking any connections from being initiated from outside the network. > $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT > $IPTABLES -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT > $IPTABLES -A INPUT -j DROP > $IPTABLES -P OUTPUT ACCEPT > $IPTABLES -F OUTPUT > $IPTABLES -P FORWARD DROP > $IPTABLES -F FORWARD > $IPTABLES -t nat -F > $IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j > ACCEPT > $IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT > $IPTABLES -A FORWARD -j LOG > $IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE > > I also try this script at home using RH 7.3 but it runs smoothly > Is this error have something to do with my kernel? > > Thanks to all > > > -- > Philippine Linux Users' Group (PLUG) Mailing List > [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) > Official Website: http://plug.linux.org.ph > Searchable Archives: http://marc.free.net.ph > . > To leave, go to http://lists.q-linux.com/mailman/listinfo/plug > . > Are you a Linux newbie? To join the newbie list, go to > http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie -- ------------------------------------------- William Emmanuel S. Yu Ateneo Campus Network Group (AteneoCNG) email : wyy at admu dot edu dot ph web : http://CNG.ateneo.net/wyu/ phone : +63(2)4266001-4186 GPG : http://CNG.ateneo.net/wyu/wyy.pgp War spares not the brave, but the cowardly. -- Anacreon
pgp00000.pgp
Description: PGP signature
-- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
