Created
January 17, 2013 18:23
-
-
Save talkingmoose/4558229 to your computer and use it in GitHub Desktop.
Launchd item to add a firewall rule via ipfw.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.318.ipfwadditions</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>ipfw</string> | |
<string>add</string> | |
<string>9997</string> | |
<string>allow</string> | |
<string>ip</string> | |
<string>from</string> | |
<string>any</string> | |
<string>to</string> | |
<string>any</string> | |
<string>via</string> | |
<string>en0</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save this file to /Library/LaunchDaemons to run at every startup.
You can add multiple rules by inserting a semi-colon between sets of strings or by creating a new file for each rule.
Be sure to adjust permissions on the .plist file: owner:root, group:wheel, 644.