Some good info and sample code can be found on the ASKUBUNTU forum on the process.
Register Hereor login if you are already a member
First make sure you have two Ethernet cards & update the /etc/network/interface file. Next, go into the client and again edit the file /etc/network/interface file for static ip. To make sure that at least the NIC card is working.
This is the basic thing to configure a Linux to make a router. Is this your office? Or just you want to gain some experience? Please provide more details.