Re: Temporarily setting DNS servers
Re: Temporarily setting DNS servers
- Subject: Re: Temporarily setting DNS servers
- From: Frederik Seiffert <email@hidden>
- Date: Fri, 23 Apr 2004 10:50:01 +0200
- Organization: equinux Inc.
Hi James,
I already had a look at MoreSCF and also played around with setting keys
in the dynamic store using the SCF routines which worked fine. So the
problem is: which keys should I set in order to make it work (i.e. so
that the system uses the new DNS servers)?
Thanks,
Frederik
OL&L Lists wrote:
There's nothing wrong with writing to System Prefs - you just don't want
to do it by writing to the prefs_ file_. You need to write a privileged
helper tool to use the SCF to modify the settings.
Forget writing to SCF using the keys - it's a nightmare and poorly
documented.
Use MoreIsBetter's MoreSCF and MoreSecurity to do it for you. See the
sample code.
Use MoreIsBetter and MoreSCF's entity routines and MoreSCF's digest
routines to create digests to marshal the data. Then set the entity into
SCF with MoreSCF.
James Masasaki
Orbital Launch & Lift, Inc.
The MacOS X helper tool experts
http://www.orbitallaunch.com
Hi!
I searched through the archives and several other places but couldn't
find an answer to this question:
What's the correct way to temporarily replace the DNS servers under
Mac OS X 10.2 and later? The preferences in the networking system
preferences panel should not be overwritten.
It would probably work to overwrite /etc/resolv.conf, however, I
figured the correct way to do this is using the System Configuration
framework. Still, I'm not quite sure which key to set. Using scutil, I
found out that setting Setup:/Network/Service/<current set>/DNS works
as expected. So should I just read the "Setup:" key to determine the
current set and set the DNS key of this set? Why is it that this
doesn't have any effect on the values written in the networking
preferences panel?
Sorry for all the questions, unfortunately the documentation on the
System Configuration framework is rather sparse...
Also, how can I set DNS servers for specific domains only (e.g. use
192.168.1.1 for *.example.com)? Again, creating files in /etc/resolver
works fine. Is this the recommended way or can/should this be done
using the System Configuration framework?
Thanks a lot,
Frederik
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.