It is probably beyond the scope of a forum like this to explain what you need in extreme detail, however there are a few online resources that do this, as well as some products that will both simplify and improve the quality of your product. One article I find quite well done is
http://librenix.com/?inode=9837. You can use a GUI tool or canned package to create a good firewall/router. Two examples of these are
homeLANSecurity and
Firestarter. These offer the advantage of someone else's expertise being built into your final product, as well as significantly reducing the learning effort.
Do you have the two ethernet interfaces working now? If yes, you are already well on your way. Have a go at it, and come back here when you bump into a problem. For further research, try Googling "linux router firewall".
--- rod.