The Mac OS X Firewall
The Mac OS X has the ability to enable a software firewall included with the operating system. This firewall like all firewalls analyzes network traffic that is incoming and outgoing. Again, firewalls help to protect your data and limits network traffic to your computer. Like all other firewalls, the user has to configure ports to be open when the operating system is on a network.
Common port numbers that may have to be opened include the internet on port 80, pop3 (incoming email) 110, smtp (outgoing email), FTP (Transferring files to or from) port 21 and other ports that may be required by other applications. If you decide to share files on your Mac, you will have to open ports 427 and 548 whereas Microsoft Windows uses port 445 for File and Print Sharing. Many of these port numbers are designed into the Mac OS and these cannot be deleted.
Turning on the Mac Firewall
Go to the Sharing control panel of System Preferences
Under the Sharing control panel, you will see the Firewall tab in the center at the top of the window
After clicking on the Firewall tab, you will have to click the Start button (the firewall is OFF by default) Once you click start, you will see the button turn to Stop. If you enable the firewall, you will limit connectivity to the Mac.
To the right of this Start/Stop button you will see services that are preconfigured. You can check these services to enable access to them or you can click on New and add a port or service to open.
By enabling port filtering, you are limiting access to and from the computer.