Added Application Firewall socketfilterfw

This commit is contained in:
Shichao An 2015-10-26 14:48:17 -07:00
parent b0760650db
commit aead4545ff

View File

@ -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)
@ -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