Firewall
A firewall is a gateway device which sits between networks and examines the traffic wanting to pass through it, and makes decisions about whether to allow, deny, log, NAT, and/or otherwise fiddle with that traffic on a packet-by-packet basis by consulting a ruleset it's been programmed with.
The main purpose of most firewalls is to protect an internal network from malicious traffic inbound from the outside network(s), but they can also be used to monitor and/or control outbound traffic. In particular, in work-related environments it can be useful to deny outbound traffic on ports used for non-work-related peer-to-peer file-sharing networks; and to deny and log outbound traffic that is characteristic of malware-related activity.
Under FreeBSD, the kernel firewall available is ipfw.
see also: Firewall, Configuring, Network Address Translation, Gateway