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.
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95369-5
      macos_15:
        - CCE-94362-1
      macos_14:
        - CCE-92959-6
    800-53r5:
      - AC-4
      - SC-7(12)
      - CM-7
      - CM-7(1)
      - SC-7
    800-171r3:
      - 03.01.03
      - 03.04.06
      - 03.13.01
  disa:
    cci:
      - CCI-000366
    srg:
      - SRG-OS-000480-GPOS-00232
    disa_stig:
      macos_26:
        - APPL-26-005050
      macos_15:
        - APPL-15-005050
      macos_14:
        - APPL-14-005050
    cmmc:
      - AC.L2-3.1.3
      - CM.L2-3.4.6
      - CM.L2-3.4.7
      - SC.L1-3.13.1
  bzk:
    bio:
      - 8.27
      - 8.27.01
  hhs:
    hicp:
      - 2.L.A
      - 6.L.A
  cis:
    benchmark:
      macos_26:
        - 2.2.1 (level 1)
      macos_15:
        - 2.2.1 (level 1)
      macos_14:
        - 2.2.1 (level 1)
    controls_v8:
      - 4.1
      - 4.5
      - 13.1
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
    '15.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
    enforcement_info:
      check:
        shell: |-
          /usr/bin/osascript -l JavaScript << EOS
          $.NSUserDefaults.alloc.initWithSuiteName('com.apple.security.firewall')\
          .objectForKey('EnableFirewall').js
          EOS
        result:
          string: 'true'
      fix:
        shell: /usr/bin/defaults write /Library/Preferences/com.apple.alf globalstate -int 1
    introduced: '10.12'
tags:
  - 800-53r5_low
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-171
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cmmc_lvl1
  - cnssi-1253_moderate
  - hicp_lp
mobileconfig_info:
  - PayloadType: com.apple.security.firewall
    PayloadContent:
      - EnableFirewall: true
