0

Is there any way to resolve a hostname without adding it to the hosts file?

In order to access an internal site in my company, I have to add the hostname and IP in the .../etc/hosts file. Is there any way to add this to the DNS server or active directory instead of manually adding this to 100 computers?

3
  • 1
    You would add it to the DNS server, since that's what it's for. ;) What have you tried? Apr 3, 2012 at 17:19
  • I am actually using windows 2008r2 and already added the name and IP to DNS manager as Host (A) but still, if I remove the IP and host from hosts file I am no longer able to access the site.
    – Mekko
    Apr 3, 2012 at 17:59
  • what is the internal ip address of your AD DNS server and what is the output of nslookup from one of your client computers (not the server)?
    – Jeremy W
    Apr 4, 2012 at 4:18

2 Answers 2

1

It seems that your server is not using your AD as DNS resolver. Or you have the negative reply cached.

Please ensure your server is using your AD server as it's DNS server. Then add the A record to it, and it should work.

You might have to run ipconfig /flushdns on the server to make sure the cache is cleaned first.

2
  • My server is using AD server as it's DNS and I flushed both the server and client but still :| !!!
    – Mekko
    Apr 3, 2012 at 18:23
  • You need to add your name in a reverse lookup zone for your ip address (.in-addr.arpa zone).
    – ZaB
    Apr 19, 2012 at 7:54
0

Set your DNS servers' addresses for DNS name resolution in /etc/resolv.conf

eg.

domain yourdomain.com
search yourdomain.com
nameserver 192.168.111.100
nameserver 192.168.111.150

You must log in to answer this question.

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