RE: Adding firewall rules at runtime...
RE: Adding firewall rules at runtime...
- Subject: RE: Adding firewall rules at runtime...
- From: "Huyler, Christopher M" <email@hidden>
- Date: Fri, 1 Aug 2003 14:11:30 -0400
- Thread-topic: Adding firewall rules at runtime...
Thanks for your help. I'm still not sure which route to take with this though.
Out of curiousity, is there a way to use the "defaults" preferences utility to modify the com.apple.sharing.firewall.plist file?
Someone mentioned I could read the whole file using Obj-C, add a new key and dictionary corresponding to my port, then output the file. However, I don't have any experience working with Obj-C and all of our code is C/C++ so there wouldn't be an easy place to just stick it in. Is there a tutorial on Apple's site that goes over i/o with a plist file?
~ Chris
-----Original Message-----
From: Creed Erickson [
mailto:email@hidden]
Sent: Thursday, July 31, 2003 12:52 PM
To: Huyler, Christopher M
Cc: Macosx-Dev (E-mail); Cocoa-Dev@Lists. Apple. Com (E-mail)
Subject: Re: Adding firewall rules at runtime...
On Thursday, July 31, 2003, at 09:32 AM, Huyler, Christopher M wrote:
>
What would be the best way to alter the firewall config file from a
>
C/C++ program?
Read the plist in, alter it, write it out.
>
Does the ipfw kernel extension send a signal whenever its table is
>
flushed?
I don't think so. I think the kext is a totally passive player in this
regard.
I think -- and this is unverified -- the System Prefs sharing panel
code sets rules according to the file
/Library/Preferences/com.apple.sharing.firewall.plist. If that's the
case, you need to alter the plist to make your changes "stick." The
change you are seeing when file sharing is started up is to add a rule
passing file sharing traffic.
I could be wrong. It certainly wouldn't be the first time. There may be
other mechanisms, but I know nothing of them.
---
Creed Erickson <email@hidden>
"Not a shred of evidence exists in favor of the idea that life is
serious."
- Brendan Gill
_______________________________________________
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.