Jul 22
A script to automtically enable and disable the firewall
Cats: News|
This hints allows your firewall to automatically turn on or off based upon which network you are on. A LaunchAgent watches resolv.conf in order to detect when there are changes in the network. Save the following in /Library/LaunchAgents:
<?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>KeepAlive</key> <false/> <key>Label</key> <string>com.yourcompany.autofirewall</string> <key>ProgramArguments</key> <array> <string>/Library/Scripts/yourcompany/autofirewall.sh</string> </array> <key>RunAtLoad</key> <false/> <key>WatchPaths</key> ...
Leave a Reply
You must be logged in to post a comment.
Subscribe
