1

I'm trying to resolve the hostname of devices connected to my wireless lan network through their ip addresses. I'm using a macbook and my /etc/resolv.conf show this as my dns server (192.168.1.1) which is a wireless router

#This file is automatically generated.  
#nameserver 192.168.1.1

i'm trying to find the hostname of the clients connected to my network using their IPs and i'm getting the following error

# nslookup 192.168.1.4 192.168.1.1  
Server: 192.168.1.1  
Address: 192.168.1.1#53  
# server can't find 4.1.168.192.in-addr.arpa.: NXDOMAIN

# nslookup 192.168.1.1  
Server: 192.168.1.1  
Address: 192.168.1.1#53  
server can't find 1.1.168.192.in-addr.arpa.: NXDOMAIN
Tolsadus
  • 1,183
  • 11
  • 23
  • Your router should provide a reverse resolution and make DHCP update that reverse zone, and probably it's not doing it. Unless you can configure your router to update the reverse zone for 192.168.1.0/24 (1.168.192.in-addr.arpa) with DHCP there's no easy way to achieve that. – Pablo Martinez Mar 10 '17 at 18:52

1 Answers1

2

It's almost a certainty that your router does not host a reverse lookup zone, which is required to resolve ip addresses to host names.

If you want or need reverse lookup resolution you'll need to deploy your own internal DNS server.

joeqwerty
  • 109,901
  • 6
  • 81
  • 172