If you're just looking to run a Linux based firewall, there are various distributions such as pfSense, Untangle, m0n0wall, etc. If you need to set up a specific Linux distribution to act as a firewall, there's plenty of packages available for that.
I don't want to help you too much with your homework, but I can tell you if you google how to make a Linux firewall, you will find plenty of guides. If you have any other questions feel free to ask.
please notice the post under you answer.