This is completely possible, however I would suggest using a dedicated
486 or P1 for a firewall being that less services/processes on a firewall
limits the amount of possible exploits from the internet.
My personal choice is one of the LEAF projects products (http://leaf.sourceforge.net).
Other similar products would include Coyote Linux, ESmith, FreeSCO, and many others.
I hope this helps,