bash# echo 1 > /proc/sys/net/ipv4/ip_forward
While this does work to turn the routing on, it is best to make sure you know how to keep it on. If you put the above line in one of the startup files then you can be sure that routing will be enabled every time you turn the computer on. The following command would do this:
bash# echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> \ /etc/rc.d/rc.local
If you mess up and mistype the above line you could do a lot of damage, so make sure you type it right. If you are not willing to mess up badly then you can use an editor instead to add the first line to the end of the /etc/rc.d/rc.local file.