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 19:43:20 +0200
- Organization: equinux Inc.
Quinn wrote:
At 10:59 +0200 23/4/04, Frederik Seiffert wrote:
I want to override DNS settings during the presence of a VPN
connection, i.e. setting new DNS servers (which are usually in the
remote network behind the VPN) when the connection is established and
setting them back to the old values when the connection is disconnected.
You probably should be doing this using the SCF dynamic store. The key
you're looking for is:
State:/Network/Global/DNS
I already tried this but it didn't seem to work. I used scutil to change
the key like this:
$ sudo scutil
> open
> get State:/Network/Global/DNS
> d.show
<dictionary> {
ServerAddresses : <array> {
0 : 192.168.1.1
}
SearchDomains : <array> {
0 : localdomain.lan
}
}
> d.add SearchDomains * localdomain.lan anotherlocaldomain.lan
> set State:/Network/Global/DNS
> quit
However, after this, /etc/resolv.conf was still the same (unlike when
changing the Setup:/Network/Service/<current set>/DNS key) and resolving
a server from anotherlocalnetwork.lan didn't work. I also tried sending
a HUP to configd and lookupd, but no luck.
Anything else I need to do in order to get a changed setting active?
Thanks,
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.