Re: Temporarily changing DNS servers and search domains in Tiger
Re: Temporarily changing DNS servers and search domains in Tiger
- Subject: Re: Temporarily changing DNS servers and search domains in Tiger
- From: Allan Nathanson <email@hidden>
- Date: Sat, 4 Jun 2005 13:16:25 -0400
On Jun 4, 2005, at 12:57 PM, Nicholas Riley wrote:
On Jun 3, 2005, at 7:23 PM, Allan Nathanson wrote:
I also tried PPTP and 6to4, and setting an empty configuration
dictionary with SCNetworkInterfaceSetConfiguration, thinking
perhaps that was what it was trying to retain. Is this supposed
to work?
Yes, it's supposed to work but there's a bug in the code (which I
just found). A bug report has been filed.
Thanks again. I really appreciate your help on this.
Your code which establishes the VPN tunnel should (minimally) post
the following SCDynamicStore keys.
1. A State:/Network/Service/<serviceID>/IPv4 key containing
information about the tunnel.
Note: an empty dictionary will result in the DNS information
(below) being ignored
Two questions:
1. I picked a <serviceID> out of the air (it's the same as the BSD
network interface name). Is this OK, or should I allocate a UUID
for it?
If you are just looking at posting the State: keys to the
SCDynamicStore than I'd suggest using a string that ties to your
organization and/or application (e.g. "edu.uiuc.VPNtunnel" or
"edu.uiuc.VPNtunnel-tun0").
On the other hand, if you end up storing adding content to the stored
preferences to go along with the tunnel than I'd push you towards a
UUID. In this case, the app that establishes the link would look
through the current services, find the one that has the configuration
settings, establishes the link, and posts its state using the same
serviceID as that used in the prefs.
2. Is this enough information to put in the dictionary?
> show State:/Network/Service/tun0/IPv4
<dictionary> {
DestAddresses : <array> {
0 : 10.84.0.161
}
Addresses : <array> {
0 : 10.84.0.162
}
InterfaceName : tun0
}
It seems to work, but if there's anything else I should add, I can
try.
That should do it!
and that's all you should need to do to direct DNS queries for the
specified supplemental domains off to the alternate set of servers.
And the supplemental domains get added to the beginning of the
search list, so it addresses both of my issues perfectly.
Great!
- Allan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden