0

I have a Server 2012 R2 machine and I have added a hosts file entry for a hostname to point to an IP.

However, when doing an nslookup, the HOSTS file does not override the result (from DNS). I can't ping the server, does this matter?

Everything else in the HOSTS file seems to look correct.

Any ideas?

Blade1
  • 1
  • 1
  • 1

1 Answers1

2

From what you wrote, everything seems OK.

nslookup is a "low level" program in a sense that it does not use the libraries that are used by other programs in the system in order to do DNS resolution. nslookup creates and sends raw DNS packets on its own and it also receives and analyzes raw DNS replies.

If you want to check your settings, use ping command on the hostname. It does not matter if you blocked ICMP or not, ping command does DNS resolution using standard libraries (that use HOSTS file), so you will see in its output, if the resolution was done as you wanted or not.

DNS resolution and using HOSTS file is not related to ICMP firewall settings, so do not worry about your inability to ping that server.

Wapac
  • 652
  • 1
  • 5
  • 16
  • Thanks for that (I setup an IP mapping to a hostname - netbios - used by server b to go to server a, but when pinging that ip, it still goes to server b, also ignoring HOSTS file). P.S. I don't have my logon on this machine, I raised the original question. – GurdeepS Jan 31 '16 at 22:25
  • Could you please elaborate little more? Could you show contents of your HOSTS file? I am little confused by server A and server B. So, could you please make it clear on which machine do you run the ping command? And what sort of configuration was done on that machine where you run ping command? – Wapac Feb 01 '16 at 14:16