Skip to content

Instantly share code, notes, and snippets.

@tkuennen
Created March 12, 2019 22:12
Show Gist options
  • Select an option

  • Save tkuennen/ae9da9d5cb7c9b669b2b8b307bba59fb to your computer and use it in GitHub Desktop.

Select an option

Save tkuennen/ae9da9d5cb7c9b669b2b8b307bba59fb to your computer and use it in GitHub Desktop.
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 0
To turn the firewall on for specific applications/services:
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1
To turn the firewall on for essential services like DHCP and ipsec, block all the rest:
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment