nslookup loopback

Playing with nslookup command I typed “nslookup loopback”. That was a typo because I wanted to mean “nslookup localhost”.
But the strange thing is the response of the command:

> nslookup loopback

Non-authoritative answer:
Name:   loopback.site

I think this is surprinsing because the same command under Windows (using the same DNS gives me an error.

So there exist two servers (loopback and loopback.site), and even I can access to them via the web browser.

This happened to me few days ago. Yesterday “nslookup loopback” gave me an error as expected (idem as Windows). But today it is happening again.
What is the expected answer to “nslookup loopback”? I thought it has to give an error.

I am using opensuse 13.1

This is what I’m getting on my laptop

knurphtlaptop:/home/knurpht # nslookup loopbackServer:

** server can't find loopback: NXDOMAIN

But, this on my server

knurphtserver:/home/knurpht # nslookup loopbackServer:

Non-authoritative answer:
Name:   loopback.knurpht.nl

and the IP is indeed the IP that’s pointing at knurpht.nl

My file /etc/resolv.conf:

### /etc/resolv.conf file autogenerated by netconfig!
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# or disable DNS configuration updates via netconfig by setting:
# See also the netconfig(8) manual page and other documentation.
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
### Please remove (at least) this line when you modify the file!
search site

Note the line “search site”.
This makes that “nslookup loopback” goes to search for the IP of “loopback.site”, that is, the suffix “.site” is appended.
And “loopback.site” exists, it is a chinese server with IP

I did not dare to edit the file /etc/resolv.conf and delete the line “search site”.
Instead I edited the file /etc/HOSTNAME. It has a single line with two words separated by “.”, the second word being “site”. I deleted “.site” and after saving the file /etc/HOSTNAME, the other file /etc/resolv.conf was also changed, I do not know how, and the line “search site” disappeared.

I think I couldn’t have done this via “Yast > Network Devices > Network settings > Hostname/DNS” because there it is mandatory to give value to the two fields: Hostname and Domain Name.



My /etc/resolv.conf has my domain where yours has site:

search <my domain name>

Followed by my manually set DNS server addresses.