Programmatic firewall configuration
Programmatic firewall configuration
- Subject: Programmatic firewall configuration
- From: Adrian <email@hidden>
- Date: Mon, 24 Sep 2007 12:35:29 +1200
I have an application that provides a service, listening on a user-
configurable port.
Currently, if OS X's firewall is active, the user must add a new
entry for my app to the firewall configuration in the Sharing pref
pane - otherwise the service can't be used from other machines.
Is it possible to open a port programatically to save the user
setting this up? Manipulating the ipfw rules manually is bad because
it disables the preferences GUI. I found a post from a few years ago
(10.2) on this topic, discussing direct manipulation of
com.apple.sharing.firewall.plist (doesn't work), and indicating the
possibility of an API for this purpose.
Thank you,
Adrian
In 2003, Jens Alfke wrote:
> A simpler approach to just look at the settings from the gui; these
> are stored in a plist in
> /Library/Preferences/com.apple.sharing.firewall.plist . This won't
> help if the user has set up a sophisticated manually configured
> firewall, but if they can do that, they can fix their own
problems :-)
I just checked with Elizabeth Douglas, who owns the firewall GUI. She
would prefer that developers not access this file.
* Above all else, DO NOT MODIFY the file. It merely shadows the real
firewall settings, so changing it will not affect the real firewall;
but it will confuse & annoy the firewall pref panel next time it runs.
* It's possible to read the file to determine how the GUI has set up
the firewall, but the format of the file may change in the future, so
we'd rather you not do this.
* In the next major OS X release there will be an API developers can
use to access the firewall settings; that will be the way to go.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden