4

I'm in the process of moving my DNS to Google Cloud Platform and wish to set up vanity nameservers.

Is this possible with gloud?

I have two domains currently in my project

abc-net.co.uk (vanity) abc.co.uk (company domain)

I have set 4 records of

ns1.abc-net.co.uk A -> 216.239.32.109 (ns-cloud-d1.googledomains.com)
ns2.abc-net.co.uk A -> 216.239.34.109 (ns-cloud-d2.googledomains.com)
ns3.abc-net.co.uk A -> 216.239.36.109 (ns-cloud-d3.googledomains.com)
ns4.abc-net.co.uk A -> 216.239.38.109 (ns-cloud-d4.googledomains.com)

I have compiled all records in my project for abc.co.uk but when I run a dig against @ns1.abc-net.co.uk it tells me recursion is not allowed

Can I not set up vanity nameservers?

jwofavn
  • 43
  • 1
  • 4

3 Answers3

5

NS Specification

NS records must point to address records (e.g. A and AAAA) and not to alias records (e.g. CNAME).

- see RFC 2181 section 10.3

Summary

Correctly creating Google Cloud vanity nameservers is possible, but does require the risk of future server down-time if Google changes any nameserver IP addresses associated with your vanity nameservers. If such a risk does not bother you, use the following directions to create them.

Directions

Note: The following directions were provided at a time when IPv4 A and IPv6 AAAA records ruled the web.

  1. Get each nameserver's IPv4 and IPv6 address.
``` $ host ns-cloud-x0.googledomains.com ```<br/><br/>
  1. Create A and AAAA records for each vanity nameserver at your domain's local DNS zone.

  2. Register each vanity nameserver's FQDN, IPv4, and IPv6 with your domain's registrar (e.g. Enom and GoDaddy).

  3. Wait for your registrar to confirm the addition of your vanity nameservers.

  4. Wait 24-72 hours to allow the new DNS records time to propagate.

  5. Update the NS and SOA records of your domains to point to your vanity servers.

Community
  • 1
  • 1
Adam Smith
  • 51
  • 1
  • 4
  • I'm stuck at step 3. Can you give a more detailed explanation for that, please? I'm using godaddy – 21st Oct 21 '19 at 10:31
2

Yes, it is perfectly doable with Google Domains.

  1. In the Custom resource records section, create A records and point them to Google DNS servers (ns1.abc-net.co.uk A -> 216.239.32.109, etc.), exactly as you did above
  2. In the Registered hosts section, create glue records (ns1.abc-net.co.uk, etc.), pointing them to the same Google servers
  3. In the Nameservers section, enter your custom name servers (ns1.abc-net.co.uk, etc.).
  4. Wait for DNS propagation (it will be near instant if you use Google or Cloudflare DNS resolver).

Note that you won't be able to have DNSSEC active.

Hope this helps.

kashmiri
  • 53
  • 7
-2

Instead of A records hardcoding the IPv4 address of ns-cloud-d#.googledomains.com, create 4 CNAME records, ns#.abc-net.co.uk, pointing to the ns-cloud-d#.googledomains.com servers. Then, your NS record would be all four of the ns#.abc-net.co.uk names that you made CNAME records for. I just did this with my domain and it is working great.

This allows the IP addresses of Google's resolver servers to change without breaking your DNS functionality. Additionally, IPv6 clients will resolve over IPv6.