0

My goal is to have a DNS server and allow others to make a DNS lookup using my DNS server IP address.

I installed bind9 and modified the named.conf.options file as below. However from a remote machine unable to perform the lookup

options {
        directory "/var/cache/bind";
        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
        dnssec-validation auto;
        listen-on { any; };
        listen-on-v6 { any; };
        allow-query { any; };
};

When I do nslookup google.com MYDNSIP on the DNS Server itself, it returns the expected result. However, from different machine, it doesn't work. Getting Server as UnKnown

Server:  UnKnown
Address:  MYDNSIP

Non-authoritative answer:
Name:    google.com
Addresses:  2607:f8b0:4006:819::200e
          172.217.12.142

Running netstat -lnptu returns the following. Output of netstat

Any help is highly appreciated. Thanks!

Kalaivanan
  • 111
  • 3

1 Answers1

2

I wonder if this is just an issue of reading nslookup's rather strange output.

This bit right here is the answer:

Non-authoritative answer:
Name:    google.com
Addresses:  2607:f8b0:4006:819::200e
          172.217.12.142

The part you are asking about, right here is not all that crucial:

Server:  UnKnown
Address:  MYDNSIP

This is a purely informational representation of the server that nslookup queried (not about the query itself or its response), and I suppose the implication of "UnKnown" here is that nslookup could not find the name of the nameserver, it only knew it by IP address. Presumably this may mean that there is no reverse entry for the IP of the nameserver.

My suggestion would be to use dig instead for any kind of troubleshooting exercise as that has both more detailed output (essentially pretty-printing the whole response) and a more rational output style.

Håkan Lindqvist
  • 33,741
  • 5
  • 65
  • 90
  • Thanks @håkan-lindqvist. You were right. Only in Windows machine, I got Server `UnKnown`. Whereas in Linux machine I got the actual IP address. My configuration was correct. I didn't know the about the nameserver in the response which works differently in different operating system. Thanks for making me clear – Kalaivanan Mar 06 '21 at 04:13