3.6 Ensure Firewall Logging Is Enabled and Configured - configured

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The socketfilter firewall is what is used when the firewall is turned on in the Security Preference Pane. In order to appropriately monitor what access is allowed and denied logging must be enabled. The logging level must be set to 'detailed' to be useful in monitoring connection attempts that the firewall detects. Throttled login is not sufficient for examine firewall connection attempts.

Rationale:

In order to troubleshoot the successes and failures of a firewall, detailed logging should be enabled.

Impact:

Detailed logging may result in excessive storage.

Solution

Perform the following to enable Firewall Logging:
Terminal Method:
Run the following command to enable logging of the firewall:

$ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setloggingmode on

Turning on log mode

$ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setloggingopt detail

Setting detail log option

Profile Method:

Create or edit a configuration profile with the PayLoadType of com.apple.SoftwareUpdate

Add the key EnableFirewall

Set the key to <true/>

Add the key EnableLogging

Set the key to <true/>

Add the key LoggingOption

Set the key to <string>detail</string>

Note: Firewall Logging must be enabled with this profile. It can either be set with the Firewall and Stealth Mode (2.5.2.2 and 2.5.2.3) or as a separate profile. Setting logging with its own profile will not cause a conflict.

Additional Information:

More info http://krypted.com/tag/socketfilterfw/

See Also

https://workbench.cisecurity.org/files/3644