OSX 10.8.2 does not use Search Domain

7

3

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

Iñaki Elcoro

Posted 2013-02-06T08:52:04.650

Reputation: 223

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 – 2013-02-14T09:37:29.773

Did you try with a .local domain? Yes it does work when I try to ping with the fullname. – Iñaki Elcoro – 2013-02-14T13:24:18.417

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 – 2013-02-14T13:48:53.237

Answers

4

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.

Iñaki Elcoro

Posted 2013-02-06T08:52:04.650

Reputation: 223

1

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

Håkan Lindqvist

Posted 2013-02-06T08:52:04.650

Reputation: 916

.local worked fine for me all the time, no mDNS here. – slhck – 2013-07-28T11:02:44.937

I solved using scutil see my answer – Iñaki Elcoro – 2013-08-01T06:47:29.627

1

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.

Anwar Maharban

Posted 2013-02-06T08:52:04.650

Reputation: 11