You're missing some of dig
options do to a reverse dns request.
As specified in the manpage of dig
the -x
allows you to use reverse lookups.
This will do the job:
dig -x 192.168.0.104
should display rameez-ubuntu
You can also use host 192.168.0.104
to get the same result.
May are you missing some configuration of DNSMasq.
As specified in the manpage of dnsmasq option
--auth-zone=<domain>[,<subnet>[/<prefix length>]
allows to :
Define a DNS zone for which dnsmasq acts as authoritative server.
Locally defined DNS records which are in the domain will be served. If
subnet(s) are given, A and AAAA records must be in one of the
specified subnets.
As alternative to directly specifying the subnets, it's possible to
give the name of an interface, in which case the subnets implied by
that interface's configured addresses and netmask/prefix-length are
used; this is useful when using constructed DHCP ranges as the actual
address is dynamic and not known when configuring dnsmasq. The
interface addresses may be confined to only IPv6 addresses using
/6 or to only IPv4 using /4. This is useful when
an interface has dynamically determined global IPv6 addresses which
should appear in the zone, but RFC1918 IPv4 addresses which should
not. Interface-name and address-literal subnet specifications may be
used freely in the same --auth-zone declaration.
It's possible to exclude certain IP addresses from responses. It can
be used, to make sure that answers contain only global routeable IP
addresses (by excluding loopback, RFC1918 and ULA addresses).
The subnet(s) are also used to define in-addr.arpa and ip6.arpa
domains which are served for reverse-DNS queries. If not specified,
the prefix length defaults to 24 for IPv4 and 64 for IPv6. For IPv4
subnets, the prefix length should be have the value 8, 16 or 24 unless
you are familiar with RFC 2317 and have arranged the in-addr.arpa
delegation accordingly. Note that if no subnets are specified, then no
reverse queries are answered.
dig
you might want to look atnslookup
from the packagednsutils
(which is also one of those providing thedig
command in the first place). I think if you're basically not interested beyondPTR
,A
/AAA
andCNAME
lookups, that's what you want. To check the lookup capabilities of your libc (as used by programs using it) you can usegetent
. The mentionedhost
utility is part of packagebind9-host
on 18.04.