From aead4545ffd4b661a85b3009e70994a3fc5e916d Mon Sep 17 00:00:00 2001 From: Shichao An Date: Mon, 26 Oct 2015 14:48:17 -0700 Subject: [PATCH 1/2] Added Application Firewall socketfilterfw --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0dccb7e..b8abc5f 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ If you want to contribute, you are highly encouraged to do so. Please read the [ - [Package Managers](#package-managers) - [Printing](#printing) - [Security](#security) + - [Application Firewall](#application-firewall) - [Gatekeeper](#gatekeeper) - [Passwords](#passwords) - [Physical Access](#physical-access) @@ -106,7 +107,7 @@ defaults write com.apple.universalaccess reduceTransparency -bool false #### Set Wallpaper -Up to Mountain Lion: +Up to Mountain Lion: ```bash osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/path/to/picture.jpg"' @@ -809,6 +810,28 @@ defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true ## Security +### Application Firewall + +#### Display If the Firewall is Enabled +```bash +sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate +``` + +#### Turn off the Firewall +```bash +sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off +``` + +#### Turn on the Firewall +```bash +sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on +``` + +#### Add the Application to the Firewall +```bash +sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /path/to/file +``` + ### Gatekeeper #### Add Gatekeeper Exception @@ -1108,7 +1131,7 @@ sudo nvram boot-args="" ### Screenshots -#### Take Delayed Screenshot +#### Take Delayed Screenshot Takes a screenshot as JPEG after 3 seconds and displays in Preview. ```bash screencapture -T 3 -t jpg -P delayedpic.jpg From d24be5d3fd439f1d9fc2e47c24c6c6d2a10fd321 Mon Sep 17 00:00:00 2001 From: Shichao An Date: Mon, 26 Oct 2015 17:01:04 -0700 Subject: [PATCH 2/2] Fixed Application Firewall according to inline comments --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b8abc5f..94be634 100644 --- a/README.md +++ b/README.md @@ -812,22 +812,22 @@ defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true ### Application Firewall -#### Display If the Firewall is Enabled +#### Show Firewall Status ```bash sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate ``` -#### Turn off the Firewall -```bash -sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off -``` - -#### Turn on the Firewall +#### Turn on Firewall ```bash sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on ``` -#### Add the Application to the Firewall +#### Turn off Firewall +```bash +sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off +``` + +#### Add Application to Firewall ```bash sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /path/to/file ```