Skip to content

Instantly share code, notes, and snippets.

@frozenfoxx
Last active February 21, 2017 20:50
Show Gist options
  • Save frozenfoxx/a60f565d510569cec00082cba45f42b5 to your computer and use it in GitHub Desktop.
Save frozenfoxx/a60f565d510569cec00082cba45f42b5 to your computer and use it in GitHub Desktop.
PacketFilter Service for OS X
# Ensure PacketFilter is running
service { 'pfctl':
ensure => 'running',
provider => base,
restart => 'pfctl -d && pfctl -F all && pfctl -f /etc/pf.conf && pfctl -e',
start => 'pfctl -f /etc/pf.conf && pfctl -e',
status => "echo \"pfctl -s info 2>/dev/null | grep Status | [ $(awk '{print \$2}') == Enabled ]\" | bash",
stop => 'pfctl -d',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment