Can I use BSD to implement a NAT device and/or an IP firewall?
Network Address Translation, or NAT, is useful when you have multiple machines on a local LAN but only one valid IP address to the outside word. In such cases, you can have the machine with the valid IP address “masquerade” for the others somehow and route their packets through. NAT handles this job, and the free BSDs offer something called natd, which does exactly this task. FreeBSD has also modified the ppp utility to support an -alias flag, which does the same job if you’re already using ppp to talk to your ISP (it saves the extra step of running natd). For more information, consult the man pages for natd and ppp. An IP firewall selectively blocks packets to or from the outside world to prevent unauthorized access. FreeBSD offers two utilities for this job: ipfw and ipfilter (the latter being also available in the other BSDs). Both essentially do the same thing; they are simply different implementations that suit different people’s preferences. For more information, see the man page