For future reference, it's important to give your threads titles that tell us as much as possible in a few words - this thread could have been titled 'Set up CentOS as a router' or 'Linux router configuration' or even 'I'm having trouble configuring my box as a router'. You get the idea. A thread called 'foobar!' will get a lot more interest from people who are interested in foobar than a thread called 'Help!!!'. In fact, the only reason I came to this thread was to share that bit of good practice with you.
That said, you should take a look at that link, but notably, it's a bit dated. I'll give you two possible pointers - firestarter is a GUI that will configure this up nicely, though I don't really like it due to the interface sucking a little bit and the desire for finer controls than it really allows. That's easy mode. If you want to do this on medium, look into shorewall - it's command-line, but it ships with a set of config files for the network configuration you want and after that you only have to read all of them and open the ports you want. Your call.
Hard mode, by the way, is using iptables directly, for which both of those are frontends. I do not recommend this. iptables makes sense but is rather painful to use, especially compared to the GUI of firestarter or the feature-oriented configs of shorewall.