OS X Yosemite: Prevent unwanted connections by using a firewall
A firewall can protect your Mac from unwanted contact initiated by other computers when you’re connected to the Internet or a network. If you turn on a sharing service, such as file sharing, OS X opens a specific port for the service to ......