Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 192.168.2.25 << my server's IP
Alternative DNS Server 192.168.2.1 << 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 192.168.2.25

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 68.178.232.99 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

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer
    
Shouldn't this work without having to do that? –  user893730 Nov 27 '11 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 '11 at 8:50
1  
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. –  Per von Zweigbergk Nov 27 '11 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.

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.