0

I'm not experienced in windows server environments however we've got a Windows Small Business Server 2011 that uses Microsofts DNS Server.

It manages our internal dns and email servers.

We've got a small requirement that we'd like to meet, that we cant figure out on windows. We've successfully done it on Ubuntu now.

Basically we on linux we had.

DNS Server Host file Client.

The client is setup their DNS to "192.168.1.200" So when they make a request it goes via that server. and with Linux the DNS server responds with entries within /var/hosts

So inside /var/hosts we could have

192.168.1.12 dev.mywebsite.com

when someone attempts to visit dev.mywebsite.com from within our network, it goes via the DNS server, checks the host file and then delivers the site correctly.

However MS DNS Server doesnt listen to the c:\windows\system32\drivers\etc\hosts

Is there a way without using the zone manager to influence the results from the dns server? e.g get it to use the host file.

OR

setup another dns server so:

request google.com dns-server-1 lookups google.com finds entry in hosts go go to 127.0.0.1 done.

but if they request a non matching domain, it will go to the 2nd dns server

request bing.com dns-server-1 looksup bing.com no matches found -> go to next dns server dns-server-2 lookup bing.com entry found -> loads website.

can anybody explain how this would be possible?

Many thanks!

1 Answer 1

0

I don't get it... why are you not simply putting the records you need into your DNS server?

  • Create a zone called "mywebsite.com"
  • Create a A record called "dev" in the "mywebsite.com" zone
  • Have the record "dev.mywebsite.com" point to 192.168.1.12

That's exactly what a DNS server is supposed to do; why would you need to put your records into the hosts file instead of where they belong, i.e. in the DNS server?

7
  • because we've got 30+ developers all with various domains, some titled slightly differently who cannot have access to the dns server tool. We've built a CMS system that allows us to modify the host file with a single sign on, and queue system as people are adding/editing all day and everybody needs to be able to access all the host names inside the host file. as everybody is familiar with the host file format of "ip hostname" layout we'd like to keep it like that
    – owenmelbz
    Mar 19, 2013 at 21:11
  • Then you will either have to modify your system to dinamically edit DNS records (hint: this this is fully scriptable using the netsh command), or have an admin do it; Windows DNS service doesn't care at all about the hosts file... and I'm quite surprised other systems do, because that file is used by the system name resolution process, not by the DNS service.
    – Massimo
    Mar 19, 2013 at 21:15
  • Okay- are you aware of any web scripts that allow dns management? or must it all be done at command line level or GUI? or is it not possible to have the computers setup to look at server-1 first, then server-2 if nothings found?
    – owenmelbz
    Mar 19, 2013 at 21:18
  • Yes, just setup server-2 as a forwarder in server-1; is server-1 is unable to resolve something, it will forward the query to server-2. But, if server-1 is a Windows server, it will still not look into its hosts file.
    – Massimo
    Mar 19, 2013 at 21:28
  • Also, have a look here: serverfault.com/questions/102649/web-interface-for-windows-dns.
    – Massimo
    Mar 19, 2013 at 21:29

You must log in to answer this question.

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