A firewall is a part of the networking of an operating system (Mac or Windows) that helps protect your Mac from “bad stuff.” Different kinds of malware traverse the Internet 24/7, trying to find open doors inside computers to get inside and do bad stuff. The name is borrowed from the the fireman’s term “firewall”, which is a brick or masonry wall in a building that will stop a fire from spreading to more of the building. A firewall in a computer helps keep the bad stuff on the other side of the wall.
To back up a bit: all PCs and Macs communicate over the Internet via what are called ports, which are certain standard “channels” that computers and networks use to talk to each other. Malware goes around checking to see if some of these ports are unlocked and open. So a firewall keeps a fire away by closing and locking the ports that you’re not currently using. (A firewall doesn’t usually stop outgoing communications from your Mac, but does help stop things from coming in.)
All versions of OS X have built-in firewalls, and yours should be turned on. There is little out there right now that can get into a Mac via a firewall that’s not on, but it’s still a good idea to have your firewall turned on now and for the future.
(The instructions below depend on you knowing what version of OS X you have. To find that, go to the Apple Menu and select “About This Mac…” That will tell you the version, under “Mac OS X.”)
If you have 10.4 Tiger, your firewall is turned on by default, and you should check to see if it is still on. Go to System Preferences (under the Apple Menu) and click on Sharing. Go to the Firewall Tab, and you’ll see one of two things: either “Firewall On” (and there will be a “Stop” button), or “Firewall Off” (and the button will say “Start”). If the Firewall is off, turn it on, and it will take a few seconds to start up.
If you upgraded to, or just got a Mac with 10.5 Leopard or 10.6 Snow Leopard, you might need to turn the firewall on, as it’s not on by default. (Apple has been criticized by security professionals for not turning the firewall on by default.) In 10.5, the Firewall is also now called the Application Firewall, which is a move by Apple to make the firewall more robust. (More here in an Apple Knowledge Base article.)
For 10.5 Leopard, go to System Preferences (under the Apple Menu) and click on Security. Go to the Firewall Tab, and you’ll see one of two things: either “Firewall On” (and there will be a “Stop” button), or “Firewall Off” (and the button will say “Start”). If the Firewall is off, turn it on, and it will take a few seconds to start up. Then tick number 2, “Allow only essential services.”
For 10.6 (as in this Apple Knowledge Base article), go to System Preferences, then click Security, and then click Firewall. Click the lock icon to unlock it, and then type an administrator name and password. Then you can click Start to turn on Firewall. After that, click Advanced, and select the “Block all incoming connections” checkbox.
There’s another feature in Snow Leopard that you can turn on called Stealth Mode. This tells your Mac to be silent if it is ever “pinged” or asked anonymously what’s behind your firewall. That means your Mac simply won’t respond to any of the curious “knock, knocks” on your firewall from someone or something on the Internet. That’s under the same “Advanced” tab.
Stealth Mode is also available in 10.4 Tiger. Go to the “Advanced…” part of the Firewall Tab and tick that box.
If some of your Web sites don’t work after you turn Stealth Mode On, you’ll need to turn it off, as some Web sites depend on different kinds of communication with your Mac.