How can I set reverse DNS on Google Cloud DNS? Example, I have domain example.com, I've created zone with example.com. as DNS name. Domain example.com works correctly and has assigned static IP 1.2.3.4. I've tried to set PTR record in this zone but this didn't work. I don't remember where but I found that I should create new zone for reverse DNS. I've added a new zone with DNS name as 4.3.2.1.in-addr.arpa. and added PTR record in this zone - DNS name without change (.4.3.2.1.in-addr.arpa.) and canonical name set to example.com. (and later also to 1.2.3.4.) But it still doesn't work, host 1.2.3.4 still shows 4.3.2.1.in-addr.arpa. not found: 3(NXDOMAIN). What am I doing wrong?
4 Answers
First, forward and reverse lookups in DNS are totally separate things, with no technical connection between them whatsoever. If your forward lookup works, fine. You can forget about it for now.
Second, reverse lookup is not in any way magical or even particularly special. It is a perfectly ordinary DNS lookup for a PTR record. The only odd thing about it is that the name being looked up was derived from en IP address. This means that, yes, the reverse lookup is a domain all of its own. So it needs its own setup and its own delegation. If you own the IP address range 1.2.3.0/24 (which you don't), you have to have the DNS zone 3.2.1.in-addr.arpa
delegated to DNS servers you control in order to be able to set up reverse lookup for your IP addresses.
Since you give no information on your actual domain and IP range we can only guess wildly at what is wrong, but a pretty informed guess is that the reverse zone for your IP range is not correctly delegated to your DNS servers.
I realize this is a very old post, but for anyone who is interested, at this time Google does not provide for the creation of PTR records.
The most likely reason that the original posters lookup is failing is that, although he created the PTR record on his name server, it's not his name servers that is being queried for that PTR record. If you try to lookup a PTR record for a particular IP address, the DNS system will query the servers assigned to provide reverse dns for that IP.
So the DNS service for that IP address (or more correctly the zone it is in) has to be assigned at ARIN by whoever owns the IP space or delegated from the IP owners servers to his servers.
Bottom line, just as DNS servers have to be assigned to a domain name, dns servers also have to be assigned to IP addresses. Because, in the case of reverse DNS, the IP address range is just like a domain name.
This can now be done as Google Cloud DNS supports PTR for in-addr.arpa as Beta in Aug 2017. See Jacques' guide: https://serverfault.com/a/866785/417516 It has GUI and CLI instructions.