I don't know of any canned firewall-oriented projects, but it sounds like an interesting idea. There used to be the
Linux Router Project but it was retired earlier this year due to lack of interest.
You may find it easiest just to install a bare-bones distro and learn how to use it.