• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Temporarily setting DNS servers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Temporarily setting DNS servers (From: Frederik Seiffert <email@hidden>)
 >Re: Temporarily setting DNS servers (From: Malte Tancred <email@hidden>)
 >Re: Temporarily setting DNS servers (From: Frederik Seiffert <email@hidden>)
 >Re: Temporarily setting DNS servers (From: Quinn <email@hidden>)

  • Prev by Date: Re: Problem within a MoreSecurity helper tool
  • Next by Date: Re: Temporarily setting DNS servers
  • Previous by thread: Re: Temporarily setting DNS servers
  • Next by thread: Re: Temporarily setting DNS servers
  • Index(es):
    • Date
    • Thread