View Full Version : Need help with crontab

08-24-2006, 12:54 AM
I would like to add this script and I don`t know how to do it, I don`t know how it`s correct.

0,15,30,45 * * * /sbin/iptables nat -A POSTROUTING -o eth1 -j MASQUERADE
0,15,30,45 * * * /bin/echo 1 > /proc/sys/net/ipv4/ip_forward
0,15,30,45 * * * /sbin/iptables -t nat -A POSTROUTING -s -o eth1 -j MASQUERADE


08-24-2006, 08:27 AM
I'm making the assumption that you are talking about doing this on a westhost vps account.

To add it, you need to login to your account using telnet or ssh, then execute the command editcron -e. This will bring up an editor where you can add the commands you mentioned. Then you just save and exit.

One problem though. I don't think we have access to iptables on our vps. So line 1 and line 3 probably will not work. I'm not sure if we have access to make the change for line 2. You'll have to test it.

08-24-2006, 12:56 PM
Well, than u can help me to create a script on booting with this commands? I use this commands to share internet connection.

08-24-2006, 01:38 PM
Does this have anything to do with an account at WestHost? Shareing an internet connection normally is something you do locally on your computer.