IPCHAINS is the successor of IPFWADM in Linux. In Version 2.2. of the kernel, ipchains is used. [Kernel Version 2.4. does already have a new concept, called the IP Tables.] ipchains can be used to do firewalling and masquerading. To configure it for forwarding, do the following:
ipchains -A forward -i <masq-interface> -s <network[x.x.x.x/xx]> -j MASQ
That's it and your machine should forward traffic from "masq-interface" to the other interface in your machine.