6

How do I change reverse DNS on Google Cloud Compute?

I want to add reverse DNS to Google Cloud Compute and can't figure out howto do it.

I want to map 11.97.196.104.bc.googleusercontent.com to ns1.example.com

http://tools.bevhost.com/cgi-bin/dnslookup?data=104.196.97.11&server=

I am having trouble verifying DKIM etc for sending emails.

7

Google won't configure reverse DNS for you

If you had a carrier such as AT&T or an EC2 instance, they offer reverse DNS services. As of now, Google does not offer this as an attribute of their service.

It is rumored they will remediate this at some point but as of now the service is unavailable.

5

Theres hope!

Paul Nash (Product Manager, GCE, Google) responded · Nov 2, 2016 We recognize that reverse DNS and PTR records in particular are important for certain applications like mail servers, and this feature request is being planned for a future release. We will update the state to started when the functionality is closer to being available.

Source: https://googlecloudplatform.uservoice.com/forums/302595-compute-engine/suggestions/8133918-reverse-dns-record-for-static-ip

Update

PTR records can now be created under new functionality that is in alpha testing. If you would like to participate in early testing, please complete the form here:

https://docs.google.com/forms/d/e/1FAIpQLSeMD4-KmAHiwIT53SeaxhW2MtJ0vbuq1F77by8sPWLgM4rryg/viewform

original url = https:// goo DOT gl SLASH efG1sK

We may not be able to invite all requestors into the alpha, depending on customer demand, but all users will be able to use the feature when it reaches “beta” status.

Paul Nash (Product Manager, GCE, Google) // Source: Google Forums

4

Following up on this topic, as of now, ie August 2017, Google Cloud gives access to this feature as a ßeta version. The procedure to make it work, as I did is: (I am using this fake ip of 123.456.789.12 as an example here)

  1. Go to Google Cloud DNS
  2. Click on 'Create Zone'
  3. Type a new zone name like reverse-on-123-456-789-12 (but you can put whatever you want)
  4. Type a DNS name that must be exactly: 12.789.456.123.in-addr.arpa.
  5. In the Description field, put whatever you want.
  6. Click 'Create'.
  7. On the new page showing the newly created zone, click on 'Add Record'
  8. In the DNS Name, do not add anything, ie leave it as '.12.789.456.123.in-addr.arpa'
  9. Select Resource Record PTR
  10. In the Canonical name, enter your hostname for which you want the reverse mapping such as mx.example.com.
  11. Click create and you are done.

You can check the reverse with host lookup querying the dns server ns-cloud-b1.googledomains.com (or whatever else is the Google name server for that particular zone) until the propagation is fully completed. and you will get: 12.789.456.123.in-addr.arpa domain name pointer mx.example.com Yeah!

Addendum: For those who are more inclined to use the CLI, let me add the working equivalent in command line:

  1. gcloud dns managed-zones create "reverse-on-123-456-789-12" --description="Reverse mapping for 123.456.789.12" --dns-name="12.789.456.123.in-addr.arpa."
  2. gcloud dns record-sets transaction start -z="reverse-on-123-456-789-12"
  3. gcloud dns record-sets transaction add -z="reverse-on-123-456-789-12" --name="12.789.456.123.in-addr.arpa." --type=PTR --ttl=300 "mx.example.com."
  4. gcloud dns record-sets transaction describe -z="reverse-on-123-456-789-12"
  5. gcloud dns record-sets transaction execute -z="reverse-on-123-456-789-12"

The step 4 is just to check the content of the yaml file, so it can be skipped.

To find out what are the name servers allocated by Google for this newly created zone, do: gcloud dns managed-zones describe reverse-on-123-456-789-12

  • 1
    First of all, thanks for the steps. I have done and already got reversed when dig -x with @ns-cloud-b1.googledomains.com. I've wait for a day but dig with @8.8.8.8 still resolve to xxx.xxx.xxx.xxx.bc.googleusercontent.com. Is there any extra steps I need to perform? – spicydog Oct 14 '17 at 14:21
  • 1
    Yes, that's true. You need to send a mail to esupport@google.com to ask them to approve you to be part of their beta users. However, Google Cloud Engine forbids the use of sensible ports on outbound connections like 25, 465 and 587. Instead they invite you to use their paying partners.... Figures. Ref: cloud.google.com/compute/docs/tutorials/sending-mail – Jacques Oct 18 '17 at 12:48
  • the GUI has come in VM network interface setting. – spicydog Nov 1 '17 at 17:02
3

Google just launched PTR record for Compute Engine.

When you can edit the VM, in the Network interfaces, there is Public DNS PTR Record for configuration.

Public PTR Record

Set it as your domain name and it will let you verify the domain.

After the verification, run command dig -x YOU_VM_IP_ADDRESS and it should be resolved to your domain now or soon. :)

Here is the manual: https://cloud.google.com/compute/docs/instances/create-ptr-record

2

Ask google to do it, reverse dns can be changed only by owner of IP sunbet thru reverse zone. But I personally don't believe it can be done.

1

Looks like Google has now added PTR. I can choose a PTR record in my DNS zones in Google Cloud. Haven't tested yet though (not sure how).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.