I had been struggling to get reverse DNS working using nslookup on Ubuntu 12.04. Here is the output of the nslookup command and the content of the different network related configuration files.
What could be the possible reason for the nslookup not working? Also, why do I need an internet connection to get a reverse lookup work for an entry in the /etc/hosts
file?
training@guest1:/etc/network$ nslookup 192.168.1.101
Server: 8.8.8.8
Address: 8.8.8.8#53
server can't find 101.1.168.192.in-addr.arpa.: NXDOMAIN
training@guest1:/etc/network$ cat /etc/hosts
127.0.0.1 localhost
#127.0.1.1 Slave1
192.168.1.101 MyUbuntuLaptop
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
training@guest1:/etc/network$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.201
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
training@guest1:/etc/network$ ping MyUbuntuLaptop
ping MyUbuntuLaptop (192.168.1.101) 56(84) bytes of data.
64 bytes from MyUbuntuLaptop (192.168.1.101): icmp_req=1 ttl=64 time=0.113 ms
64 bytes from MyUbuntuLaptop (192.168.1.101): icmp_req=2 ttl=64 time=0.222 ms