7

Yosemite doesn't seem to understand any domain that ends in .local

My DNS server is pointed at the ip of the debian box, which runs dnsmasq.

It has a ton of apache sites configured that all have names like clientname.debserver.local - all which resolve fine from the other machines around the lan (not Yosemite).

(tried flushing cache, resetting network, rebooting, all the usual suspects)

10

Apple has provided some related documentation here. In which they recommend avoiding .local if you can and instead using a suffix such as .private, .intranet, .internal, or .lan.

The reason .local should be avoided is because it's used by the Bonjour service.


Short Answer

Add the following Search Domain as in the screenshot (you can disregard my DNS Server settings):

enter image description here


Long Answer

Another possibility is documented here in an article about using Dnsmasq for local development on OS X and a related StackOverflow question in which someone seems to have found it successful except when their offline (which doesn't make a lot of since.. but the key point here is, it seems to work for them at least part of the time)

The linked article directs that you should create a directory at /etc/resolver if it doesn't already exist by using the command

sudo mkdir -p /etc/resolver

Now you should create a new file in this directory for each resolver you want to configure. Configure with at least these two options (there are more options available):

  • the name of the resolver (corresponding to the domain name)
  • the DNS server to be used.

For more information about these files, see the resolver(5) manual page:

man 5 resolver

Create a new file with the same name as your new top-level domain in the /etc/resolver/ directory and add a nameserver to it by running the following commands:

sudo tee /etc/resolver/local >/dev/null <<EOF nameserver 127.0.0.1 EOF

Here local is the top-level domain name configured to respond to and 127.0.0.1 is the IP address of the server to use.

I looked to see if I had that directory by default and I did not, but I did notice I had a file /etc/resolv.conf which existed by default. I have not attempted, but if the solution in the article is unsuccessful I would try using this pre-existing resolv.conf file.. under the assumption.. it must be there for a reason.

1

Apple does not resolve .local using a DNS server, but Apple Bonjour its zeroconf impementation. You could install Avahi the Linux and BSD implementation.

I use netatalk on my Linux boxes to communicate with OS X

1

See https://apple.stackexchange.com/a/152892/65787 for a way to automate sudo discoveryutil mdnsactivedirectory yes which forces DNS resolution of .local domains on Yosemite.

0

If you have just the one Mac and the ip addresses don't change, you can bypass the whole problem and put the name/address in /etc/hosts. People forget, there was a time before DNS where we kept the hosts files synched by uucp'ing them around.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .