i have dnsmasq setup in my server. For some security reasons, i am not allowed to modify the /etc/hosts file or create any additional hosts file to store the hostname and the ip addresses.
so in dnsmasq.conf file i have added the hostname and ip address ,
address=/node01.black.system/10.248.11.21
and when i type
nslookup node01.black.system
i get the resulting ip address. But it doesn't vice cersa. If i do
nslookup 10.248.11.21
i am getting server can't find...:NXDOMAIN
however , when i add a ptr record in the dnsmasq.conf file
ptr-record=21.11.248.10.in-addr.arpa., node01.black.system
and then if i type
nslookup 10.248.11.21
i am getting the resultant hostname. Is there a way for this to work both ways, without adding the ptr-record?
because there are like 100 nodes, which will need resolution either way in the server
Thank you
Perhaps you are looking for the --host-record directive which creates both an A and PTR record.
e.g.
Whereas according the the dnsmasq man page the address option is to define an IP returned for any address in a domain. It does not mention creating a PTR record.
Since you are prevented from modifying the /etc/hosts file or creating any additional hosts, the following may not apply to your situation; but I consider them useful and related. These two options allow defining hosts outside of the normal /etc/hosts and the dnsmasq config.