THIS IS OLD. USE IPTABLES NOW.
Debian Packages: bastille.
A firewall can be set up on a machine connected to the Internet and can then relay network traffic to machines connected on a local network.
The bastille package provides both a firewall and Network Address Translation (NAT--also referred to as IP Masquerading). When installing the package use the defaults and all should be just fine.