Skip to content

Instantly share code, notes, and snippets.

@yock
Forked from scottslowe/pf-launchd-item
Last active March 30, 2016 03:24
Show Gist options
  • Save yock/338c334b07791270f6f2a1037e992b8e to your computer and use it in GitHub Desktop.
Save yock/338c334b07791270f6f2a1037e992b8e to your computer and use it in GitHub Desktop.
This is a launchd item that you could use to automatically start pf on OS X Mountain Lion at boot.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>dev.forwarding.apache</string>
<key>Program</key>
<string>/sbin/pfctl</string>
<key>ProgramArguments</key>
<array>
<string>/sbin/pfctl</string>
<string>-e</string>
<string>-f</string>
<string>/etc/pf.anchors/apache.forwarding</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>FreeBSD Packet Filter (pf) daemon</string>
<key>StandardErrorPath</key>
<string>/var/log/pf.log</string>
<key>StandardOutPath</key>
<string>/var/log/pf.log</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment