id: system_settings_firewall_enable
title: Enable macOS Application Firewall
discussion: |
  The macOS Application Firewall is the built-in firewall that comes with macOS, and it _MUST_ be enabled.

  When the macOS Application Firewall is enabled, the flow of information within the information system and between interconnected systems will be controlled by approved authorizations.
check: |
  /usr/bin/osascript -l JavaScript << EOS
  $.NSUserDefaults.alloc.initWithSuiteName('com.apple.security.firewall')\
  .objectForKey('EnableFirewall').js
  EOS
result:
  string: 'true'
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-95369-5
  cci:
    - CCI-000366
  800-53r5:
    - AC-4
    - SC-7(12)
    - CM-7
    - CM-7(1)
    - SC-7
  800-53r4:
    - AC-4
    - AC-6(1)
    - AC-19
    - SC-7
    - CM-7
    - CM-7(1)
    - SC-7(12)
  srg:
    - SRG-OS-000480-GPOS-00232
  disa_stig:
    - APPL-26-005050
  800-171r3:
    - 03.01.03
    - 03.04.06
    - 03.13.01
  cis:
    benchmark:
      - 2.2.1 (level 1)
    controls v8:
      - 4.1
      - 4.5
      - 13.1
  cmmc:
    - AC.L2-3.1.3
    - CM.L2-3.4.6
    - CM.L2-3.4.7
    - SC.L1-3.13.1
  bio:
    - 8.27.01
macOS:
  - '26.0'
tags:
  - 800-53r5_low
  - 800-53r4_low
  - 800-53r4_moderate
  - 800-53r4_high
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-171
  - cis_lvl1
  - cis_lvl2
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cmmc_lvl1
  - stig
  - cnssi-1253_moderate
  - nlmapgov_plus
severity: medium
mobileconfig: true
mobileconfig_info:
  com.apple.security.firewall:
    EnableFirewall: true
