Information
A firewall minimizes the threat of unauthorized users from gaining access to your system while connected to a network or the Internet.
Solution
Perform the following to implement the prescribed state:
Open System Preferences
Select Security & Privacy
Select Firewall
Select Turn On Firewall
Alternatively:
Run the following command in Terminal:
/usr/bin/defaults write /Library/Preferences/com.apple.alf globalstate - int <value>
Where <value> is:
1 = on for specific services
2 = on for essential services