Disable Mac OSX Firewall from Command Line
So.. you turned on the firewall on your remote Mac, and now you've locked yourself out of Screen Sharing? Good work. I've... err... never done that before.
You can turn off the firewall by setting the global state to 0:
sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 0
Then just restart the firewall agent services:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.alf.agent.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.alf.agent.plist
And presto! You're back into your Mac!
Written by Gavin Bunney
Related protips
2 Responses
Awesome, thank you so much!! For some reason this was the only post I could find with a clear explanation.
over 1 year ago
·
Thanks. I'll test this out.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mac osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#