0
votes

I'm trying to add a PTR DNS record in Google Cloud DNS and I'm getting an error every time I save the file through the command console. I have added other entries and they are working as expected.

{
  "kind": "dns#resourceRecordSet",
  "name": "xxx.xx.148.146.in-addr.arpa.",
  "rrdatas": [
    "mail.mydomain.com."
  ],
  "ttl": 60,
  "type": "PTR"
}

The error I receive is Invalid value for 'entity.change.additions[0].name

I've tried following the example here and it doesn't work https://groups.google.com/forum/#!msg/cloud-dns-discuss/quaYSpZImQg/QANCaDOzp3AJ

1

1 Answers

4
votes

The error you are getting is due to the PTR record's "name:" field. Google servers check this field's domain part (everything after the first dot) to be equal to the domain specified as dns_name when the managed zone (zone file) was created, i.e. is reflected in the zone's SOA record.

When it come to PTR records, said records can NOT be placed into the same zone (aka managed-zone in G lingo) as the rest of domain records: said PTRs are to be placed under a separate zone file, a separate domain for all intents and purposes. Think of it as a reverse domain. This domain's name is conditioned by the subnet the PTR's IP belongs to. For instance, a PTR record that looks up IP 1.2.3.4 would be placed inside a zone named 3.2.1.in-addr.arpa. In said zone, one would find PTR records relating IP 1.2.3.4 and the rDNS result 4.3.2.1.in-addr.arpa

So, in your case, make sure you have a zone with dns_name xx.148.146.in-addr.arpa. (more on that here), into which you can then place your PTR records for IPs starting with 146.148.xx.