0

I am not sure what happened but after reinstalling Windows DNS (server 2012 r2), when I do an nslookup and enter any domain it appends my domain to the end. For example:

I enter "microsoft.com" and it searches for "microsoft.com.acme.com".

I have to end each query with a period "microsoft.com." to get it to return what I expect.

What causes this?

JonathanDavidArndt
  • 1,424
  • 3
  • 20
  • 29
Jon Glazer
  • 155
  • 2
  • 12

2 Answers2

2

That's how nslookup works. A query without the trailing dot is unqualified, so nslookup appends the primary and/or connection specific DNS suffixes and then strips them off from right to left for each successive "devolution" of the query. You can see this behavior by running nslookup in debug mode. If you don't want this behavior then always use a trailing dot to make your query fully qualified.

https://blogs.msmvps.com/acefekay/2013/02/17/nslookup-suffixing-behavior/

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
  • Simpler, `nslookup` manpage: "If host is a name and does not have a trailing period, the search list is used to qualify the name.". You should use `dig` instead anyway :-) – Patrick Mevzek Feb 10 '18 at 17:33
  • 2
    I don't see why the OP would be looking for Windows nslookup help in Linux manpages. Additionally, there's nothing wrong with nslookup in Windows. Thanks for your input just the same. – joeqwerty Feb 10 '18 at 17:36
  • `dig` is a superior tool (and does not have this behavior for a good reason) whatever OS you use, and I do not think that `nslookup` was invented on Windows. Man pages are readable on the web... – Patrick Mevzek Feb 10 '18 at 17:40
  • 1
    My point was that it would be counter-intuitive for someone working on a Windows machine to read Linux manpages to find answers to a question about Windows. I certainly wouldn't read the Linux manpages on nslookup to learn how nslookup works in Windows. – joeqwerty Feb 10 '18 at 17:47
  • "My point was that it would be counter-intuitive for someone working on a Windows machine to read Linux manpages". Is `nslookup` a specific Windows tool created in Windows world? Surely not. As such, looking online for documentation on it doesn't seem far fetched. If Windows is unable to provide the equivalent of local manpages, this is sad, but nothing that can be solved in the perimeter of this question. Also as any good tool, normally `--help` or `-h` does show useful things. The fact it doesn't work is also another reason to prefer `dig` for any DNS troubleshooting needs, no matter the OS – Patrick Mevzek Feb 22 '23 at 21:36
0

Delete your search domain, or remove the wildcard record for *.acme.com

Jacob Evans
  • 7,886
  • 3
  • 29
  • 57