Turn on the application firewall in OS X:
- Choose System Preferences from the Apple menu.

- Click Security or Security & Privacy.

- Click the Firewall tab.

- Unlock the pane by clicking the lock in the lower-left corner and enter the administrator username and password.

- Click "Turn On Firewall" or "Start" to enable the firewall.
- Click Advanced to customize the firewall configuration.