A firewall is a dedicated appliance, or software running on computer, which inspects network traffic passing through it, and denies or permits passage based on a set of rules.A firewall can help prevent bad packets from entering your Mac.Leopard ships with two firewall engines: the original BSD IPFW, which was present in earlier releases of Mac OS X, and the new Leopard Application Layer Firewall. Unlike IPFW, which intercepts and filters IP datagrams before the kernel performs significant processing. Application Layer Firewall operates at the socket layer, bound to individual processes. The Application Layer Firewall can therefore make filtering decisions on a per-application basis. Crackers love to run automated applications that can scan thousands of computers (including your Mac) for open ports that can be exploited. To ensure that random individuals do not gain unauthorized access to your Mac, you should enable Mac OS X’s built-in firewall. It will close your Mac’s open ports and disallow random network scans.
Here’s how to turn on and configure your Mac’s built-in firewall:
1. From the Apple menu, select System Preferences. Click on Sharing.
2. Select the Firewall tab. If your Mac’s firewall is turned off (it will say “Firewall Off” if it is), click the Start button to turn it on. Trust us, you do want your firewall turned on!
3. Now click the Advanced button. You have three options here: Block UDP Traffic, Enable Firewall Logging, and Enable Stealth Mode. We suggest that you select the Enable Stealth Mode check box. It doesn’t have many side-effects, unless you want people to be able to perform stealth scans of your Mac.
4. Click OK to save your changes. Close Systems Preferences. Your Mac is now protected by its built-in firewall!