First you need to decide the type of firewall, this depends on the ip address types you use, IPN or EPN "Internal private network addresses like 192.198 , 10. ,172.16 " or you have EPN external public network addresses allocated by internic.
Also the speed of the connection is important as to the speed of the Linux box. “i.e a Nat firewall needs a fast processor if over a 512kb or greater connection”
If you use IPN numbers then you'll need to have a NAT firewall, if not then simply a source routed firewall.
You can use ipchains or iptables to do this.
Then you need to know the names of your interface cards on the Linux box and the relationship they have to the physical network.
Then you build a solid rule set for ipchains or iptables to use. Only routing the correct protocols to the correct ports with flood and spoof filtering.
If you want to learn about ipchains or iptables then start with these sites, then once you get into problem contact us.