Your WRT54G is actually a Linux device already configured to do all of the things you want it to do. If it were me I would make your Linksys device your firewall/DHCP/etc box and put the x86 machine behind your Linksy box so you can use it for more things than just a firewall. You really want to limit the machine acting as your firewall to be only a firewall if possible. The LinkSys has just enough resources to do this task and a little more. Another advantage is the number of interfaces/switch ports it comes with. When my P100 finally gives up (I've been waiting for this for years) I am going to move one of my WRT54Gs into it's place.
If the web based menus on the WRT54G are too constraining for you then you could always install OpenWRT on it and have more configuration flexibility:
Now, if you still want to use your other machine as a firewall you will still configure it in a similar way to how the WRT54G is configured under the covers (using "iptables"). There are countless ways that you can configure iptables ranging from using the "iptables" command on the command line, to writing a script containing all of your iptables firewall commands, to configuration utilities like Shoreline Firewall
(the one I use for a setup similar to what you are looking for). There is some good reading there even if you don't want to use their wrapper.
Having said all that I currently don't use the LinkSys unit for my firewall OR my DHCP server. I have two units and use one as a wireless bridge only (don't even use the Internet interface) and the other one I just use as a web server (it's currently just an extra one I have that I thought I killed at one point causing me to get a new one):
I use Shorewall (currently on an FC1 box) for my firewall and a different Linux machine doing my DHCP/DNS and a few other similar tasks. Here is rough example of what I have setup and instructions for how I have DHCP/DNS set up:
http://voidmain.is-a-geek.net/redhat/fe ... c_dns.html
The instructions should work for FC3 even though it indicates FC1 in the doc.
Now, if you just want to get down and dirty with iptables for seting up your machine to do the firewall/routing like you are asking then the best place to start would be here:
http://www.tldp.org/HOWTO/Masquerading- ... index.html
The link above is actually something that would be helpful to read and understand no matter which firewall wrappers you want to run. They all will actually set up iptables similar to what is listed there, you just may not realize it.
More in depth:
http://www.tldp.org/HOWTO/IP-Masquerade ... index.html
More Linux routing related networking in general:
http://www.tldp.org/HOWTO/HOWTO-INDEX/n ... NETROUTING