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:
I think this is surprinsing because the same command under Windows (using the same DNS 64.6.64.6) 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.
### /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:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
# 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
nameserver 64.6.64.6
nameserver 64.6.65.6
nameserver 8.26.56.26
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 60.205.24.133.
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.