Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I´m trying to configure search domains on OSX, however with no succes.

I configured my search domain for the Wi-FI interface on network preferences, like this:

OSX preferences

However when trying to resolve any host, either from web browser or terminal, it does not append the domain:

DNS resolving error

share|improve this question
    
I added me.com to search domains, accepted, applied the configuration and worked as expected when I pinged mail: it actually resolved mail.me.com. Have you pressed the button 'Apply' in network configuration after making the changes? Does it work if you try ping srvcon17.consultec.local? –  jaume Feb 14 '13 at 9:37
    
Did you try with a .local domain? Yes it does work when I try to ping with the fullname. –  iCe Feb 14 '13 at 13:24
    
No, I haven't, I don't have any .local domain to test with. I don't see why it shouldn't work with a .local domain, though, provided the DNS server is properly configured. To check it, could you add the output of nslookup -query=ns consultec.local to your question? –  jaume Feb 14 '13 at 13:48

3 Answers 3

up vote 2 down vote accepted

I solved using a script to add the domain suffix via scutil, open a terminal and run:

scutil    
open
get State:/Network/Service/yourvpnconnection/DNS
d.add DomainName mydomain.local
set State:/Network/Service/yourvpnconnection/DNS

It seems that the DNS suffix configuration does not apply to dynamically created VPN connections, like the forticlient SSL VPN client creates. So this script configures the search domain options for the dynamically created connection.

share|improve this answer

The .local "TLD" is reserved for use with mDNS ("Bonjour" in Apple-land), I can only assume this is the cause for these problems. (Names ending in .local can be expected to be resolved in mDNS rather than DNS.)

Also see http://en.wikipedia.org/wiki/.local#Multicast_DNS_standard and http://tools.ietf.org/html/rfc6762#section-3

share|improve this answer
    
.local worked fine for me all the time, no mDNS here. –  slhck Jul 28 '13 at 11:02
    
I solved using scutil see my answer –  iCe Aug 1 '13 at 6:47

You can just create a directory in /etc called resolver and then create a file with the settings of your domain in it.

For example, if your domain is "lan":

mkdir /etc/resolver
vi /etc/resolver/lan

Add the following to the "/etc/resolver/lan" file:

 domain lan
 search lan
 nameserver your_nameserver_ip

You will now be able to ping client1.lan client2.lan etc. over VPN.

This will make sure that it will first search through the custom settings and when it doesn't match your query it will then use the default dns domain and search settings.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.