Re: Automatically opening the firewall?
Re: Automatically opening the firewall?
- Subject: Re: Automatically opening the firewall?
- From: Chaz McGarvey <email@hidden>
- Date: Sun, 25 Jul 2004 13:45:24 -0600
On Jul 25, 2004, at 1:33 PM, Frederick Cheung wrote:
On 25 Jul 2004, at 20:34, Chaz McGarvey wrote:
Hello:
Is there a way to detect if a port is being blocked by the firewall
OS X uses? If so, is there a way to programmatically open a port?
What I think would be nice is that when my server was run, it could
detect if its port was being blocked and inform the user about this
and offer to open it for them. In fact, now that I think about it,
it would kind of be nice if the system did that automatically
whenever listen() (or equivalent) was called and then closed the port
when the server stopped listening. Would this be too big of a
security risk?
I don't believe there is an API to query the firewall or modify its
rules. You wouldn't be able to change rules without superuser
privileges.
Automatically opening a port whenever listen was called would entirely
defeat the point of having the firewall rules in the first place
That would certainly be true if programs were allowed to open ports
without permission from the user (with superuser privileges). But this
is different because it asks the user much like authenticating
currently works. This would basically just be a convenience for the
user. Users could always accomplish the same thing by opening System
Preferences and going into Sharing and clicking on Firewall and
clicking on New and scrolling the popup to Other and typing in the port
(which they may not know) and clicking OK. All that could be done by
entering a superuser name and password and clicking OK and it would be
done by the system.
Actually, the main reason I care and the reason I brought it up is
because with this feature at least users would know why other people
can't connect to their server. It's just kind of an annoying support
question for me. Oh well.
Chaz McGarvey
http://www.brokenzipper.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.