Hi Amit, On Thursday 26 January 2006 05:33, amit ash wrote: > Hi, > > I made a new script file in "/etc/init.d" by the filename > rc.ipmasq with the following script in it - > > #!/bin/sh > IPTABLES=/sbin/iptables > $IPTABLES -F -t nat > $IPTABLES -A POSTROUTING -t nat -o eth0 -j MASQUERADE > echo 1 > /proc/sys/net/ipv4/ip_forward > ----- This is not the correct syntax for a start script. Please review the structure of /etc/init.d/skeleton. Then modify the entries according your purpose (look for the "FOO" entries which have to be replaced). Use other startup scripts in /etc/init.d/ to learn about the structure and the use of these scripts. > > After this i ran the "insserv rc.ipmasq" command which gave no > errors but still NAT wont work, it shows no output in the command > "iptables -L -t nat" either. however it gives me this error msg > when i type this command:- > linux:~ # /etc/init.d/rc.ipmasq > /etc/init.d/rc.ipmasq: line 2: IPTABLES: command not found > /etc/init.d/rc.ipmasq: line 3: -F: command not found > /etc/init.d/rc.ipmasq: line 4: -A: command not found > > I am unable to understand, why it wont accept this code. Learn about the SUSE boot concept using "man init.d" and "man insserv" (maybe also "man chkconfig"). To set your NAT rules, call the script with the parameter "start", i.e. "/etc/init.d/rc.ipmasq start". But make sure that all the NAT settings are defined in the start section of the script. This is quite off-topic of this list. Regards, Peter -- Peter Albrecht, Novell Training Services, peter.albrecht@xxxxxxxxxx