I am connected to the lab private network using VPN. However, when I do

Host Ip_address m getting following error.

Host x.x.x.x.in-addr.arpa. not found: 3(NXDOMAIN)

Quick googling told me that my name server address in /etc/resolv.conf file is and which is public dns address for the google. Hence I tried finding my DNS address and updated the reslov.conf with that address (private dns address)

Upon doing so I again tired executing host command but m still getting following error

;; connection timed out; no servers could be reached

output of resolv.conf

root@kali:~# cat /etc/resolv.conf

M not sure how to obtain my DNS server address tried following method but can’t see DNS address attaching screen shot

enter image description here

  • Have you tried using nslookup? – Nasir Riley Apr 14 '18 at 19:35
  • yup getting following error .. Commad : nslookup Error : Server: Address: ** server can't find NXDOMAIN – MVnD3X Apr 14 '18 at 19:36
  • @Nasir Riley I wanted to determine the hostname from an IP address – MVnD3X Apr 14 '18 at 19:37
  • I'm going to guess that reslov.confis a typo. It's still using Google's public DNS. Add the output of you /etc/resolv.conf file to your question. – Nasir Riley Apr 14 '18 at 19:41
  • Is there actually an rDNS entry for the address in question? – roaima Apr 14 '18 at 19:48

Should probably point out that Google's two DNS servers are:

Not entirely related to your point, but still!


Thanks all for your valuable contribution i finally found the answer. I don’t know if this is the normal way, but I would like to share the approach. I was searching for ipconfig /all Linux equivalent command in order obtain DNS address for the local network in my kali machine

I knew from very beginning that I have to enter my local DNS address in /etc/resolv.conf file.

So what I did was I compromised the windows machine which was the same network and used ipconfig /all command on the compromised machine. From there I got the DNS address of the network which I updated In my /etc/resolv.conf file and now nslookup command works like a charm.

Note to myself:

Try and search ipconfig /all command equivalent for Linux in order to get DNS address on local kali machine itself.

  • I added the same to my answer but it's good to see you got it working. – Nasir Riley Apr 14 '18 at 21:27
  • Look at ifconfig and ip under Linux. – Patrick Mevzek Apr 14 '18 at 22:15

That's your problem. You need to add your internal DNS server to your /etc/resolv.conf file.

Google's public DNS servers can't resolve hostnames or IP addresses of your internal servers or workstations which most likely have private addresses aren't routable on the internet.

If you set the networking to DHCP then it should pick up your internal DNS server. You can then return it to static.

If that doesn't work, you can ask your IT department or find a computer which can resolve internal hostnames and use that to get the internal DNS server.

  • 1
    This answer should have more info. such as an explanation of why this addresses the issue. – Patrick Apr 14 '18 at 20:38
  • Normally, I'd figure that would be known but in this case, you have a point so I'll add that info. – Nasir Riley Apr 14 '18 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.