2.2.1 Ensure Firewall Is Enabled

Information

A firewall is a piece of software that blocks unwanted incoming connections to a system. The socketfilter Firewall is what is used when the Firewall is turned on in the Security & Privacy Preference Pane. Logging is required to appropriately monitor what access is allowed and denied. The logs can be viewed in the

macOS Unified Logs

.

In previous versions of macOS (prior to macOS 15 Sequoia) there was an additional step to turn on firewall logging after enabling the firewall. As of macOS 15 logging is turned on automatically without user interaction. The logging recommendation has been removed in the macOS 15 benchmark and will not be included going forward. If your organization is looking for more detailed information about network security, you will need a third-party solution.

A firewall minimizes the threat of unauthorized users gaining access to your system while connected to a network or the Internet.

Solution

Graphical Method:

Perform the following steps to turn the firewall on:

- Open System Settings
- Select Network
- Select Firewall
- Set Firewall to enabled

Terminal Method:

Run the following command to enable the firewall:

% /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on

Profile Method:

Create or edit a configuration profile with the following information:

- The PayloadType string is com.apple.security.firewall
- The key to include is EnableFirewall
- The key must be set to <true/>

Impact:

The firewall may block legitimate traffic. Applications that are unsigned will require special handling.

See Also

https://workbench.cisecurity.org/benchmarks/18636

Item Details

Category: AUDIT AND ACCOUNTABILITY, CONFIGURATION MANAGEMENT, INCIDENT RESPONSE, SYSTEM AND SERVICES ACQUISITION, SYSTEM AND COMMUNICATIONS PROTECTION, SYSTEM AND INFORMATION INTEGRITY

References: 800-53|AU-6(1), 800-53|AU-7, 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|CM-7(1), 800-53|CM-9, 800-53|IR-4(1), 800-53|SA-3, 800-53|SA-8, 800-53|SA-10, 800-53|SC-7, 800-53|SC-7(5), 800-53|SI-4(2), 800-53|SI-4(5), CSCv7|5.1, CSCv7|9.4, CSCv7|9.5

Plugin: Unix

Control ID: efbadfed00f74a5d6b4abc8f847546f295abf99eb84b0eea22057e9021946035