10.5: Control the firewall from the command line

Jan 14, '08 07:30:00AM

Contributed by: allanmarcus

It appears you can turn the Leopard firewall on or from the command line with this command:

sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1
The last value represents the state of the firewall, where: There are other settings in the /Library/Preferences/com.apple.alf.plist file that you can explore and test to control other aspects of the firewall.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080110103812947