Repeated Google'ing confirms that many users are in the same boat. We all want, it seems, something that just sits in the menu bar and monitors firewall status. Why didn't Apple think to include one?! Grumble, gurmble...
Then I had a brainstorm: I figured out a super-quick way to check the firewall status using Terminal (one command, and you don't have to be a Super User to execute it!), so I figured that maybe I could get that to work in conjunction with an AppleScript.
Here's what you do...
- Make sure the Script Menu is active -- look in the AppleScript folder (in /Applications) for info on how to enable it. You'll probably want to select Hide Library Scripts from its menu, once it's running.
- Open Script Editor (also in the AppleScript folder), and paste in the following code:
Now just save this as an application (use Save As...), remembering to uncheck the Startup Screen option. The name you save this app under really doesn't matter, as we'll see in a moment.tell application "Finder" try do shell script ¬ "egrep 'true' /Library/Preferences/com.apple.sharing.firewall.plist" on error set the name of (path to me) to "Firewall is off." return end try set the name of (path to me) to "Firewall is on." return end tell - Put the newly-created application in your user's Library -> Scripts folder. When you click on the script icon in your menu bar, the name will show up. Select it and...
- If your firewall is running, the name of the app itself will change to Firewall is on. This is now what will show up when you click on the Script icon on your menu bar. If your firewall isn't running, the name will be Firewall is off.
I have my system set to execute applications named Firewall is on. and Firewall is off. in my user's Library/Scripts folder every five minutes; it simply ignores whichever one is not present. The only thing you have to remember is to put a slash (/) in front of the interval you wish to set. For example, instead of entering 5 for five minutes, enter /5.
This works very well, I've found, with no real demands on the system.
[robg adds: As submitted, this hint instructed the script to be placed in your user's Library -> Preferences -> Scripts folder. I don't believe that's correct, as anything placed there will not show in the Scripts menu. Instead, I've changed the hint to reflect the user's Library/Scripts folder, which does show its contents in the Script menu.]

