I have a bind server setup on my mac OS lion,

And I have a few domains like myproject.com point to the same server using the configurations here:

Mac Os Server, how to make bind point www.mydomain.com to the same machine bind is installed on?

I have a few windows machines in my LAN, I have setup their DNS server addresses as follows

Preferred DNS Server << my server's IP
Alternative DNS Server << my Router

Here is a screenshot of my windows preferences,

windows dns preferences

Everything works as expected, when I ping myproject.com from my windows machine, it resolves to

Now the problem is, the server itself is not configured to use it's own DNS, so when I ping myproject.com it resolves to which is the actual IP address of myproject.com on Internet.

Here is a screen shot of how I have tried to setup the server to use it's own DNS server in System Preferences -> Network -> Ethernet -> Advanced -> DNS

dns server settings on mac os lion

What am I doing wrong here? Is there a way to make this server look at it's own DNS first and then look at the router's DNS when trying to resolve a domain name?

gateway.2wire.net is the default value for search domains.

Thanks, Any help is appreciated

2 Answers 2


The best way to solve this would probably be to set your DNS server to only use localhost for DNS lookups, and configure your bind server as a forwarder to your upstream DNS server.

  • Shouldn't this work without having to do that?
    – user893730
    Nov 27, 2011 at 5:29
  • No, it shouldn't work without that, even with windows strictly speaking it shouldn't work. You need to allow forwarding OR allow recursion, and use this server only.
    – Sandman4
    Nov 27, 2011 at 8:50
  • 2
    Nope, this is the only practical way to go. The list of DNS servers in an operating system is not a "check this first, if that fails, check that"... it's a list of servers of equal "rank" so to speak. Nov 27, 2011 at 17:09

Sometimes a static hosts file entry is the way to go. Setup nsswitch to look up against local hosts file first and you should be OK.

You must log in to answer this question.

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