(Legacy networks) Create DNS forwarding rules

Your private cloud's DNS forwarding rules determines how Google Cloud VMware Engine forwards DNS requests from management appliances to the DNS servers of your on-premises services.

You can configure multiple conditional DNS forwarding rules each with one or more DNS servers associated with the domains.

Here are some example processes that require conditional DNS forwarding rules:

Before you begin

The steps in this document assume that you have done the following:

Create DNS forwarding rules

To create DNS forwarding rules in your project, use one of the following methods.

Console

To create a DNS forwarding rule for a private cloud by using the Google Cloud console, complete the following steps:

  1. Access the Google Cloud console.
  2. From the main navigation, click Private clouds.
  3. Select the private cloud to create a rule for.
  4. On the private clouds summary page, click DNS.
  5. Click Add rule.
  6. Specify the domain you want to forward for and specify one or more IPv4 addresses that can resolve the domain, provided as a comma-separated list.

gcloud

To create a DNS forwarding rule for a private cloud, use the gcloud vmware private-clouds dns-forwarding update. You can specify one or more --rules for each request.

gcloud vmware private-clouds dns-forwarding update \
    --project=PROJECT_ID \
    --location=ZONE \
    --private-cloud=PRIVATE_CLOUD_NAME \
    --rule=domain=DOMAIN,name-servers=DNS_SERVER_IP1,DNS_SERVER_IP2,.... \
    --rule=domain=DOMAIN,name-servers=DNS_SERVER_IP1,DNS_SERVER_IP2,....

Replace the following:

  • PROJECT_ID: the ID for your project where the private cloud is located
  • ZONE: the zone for the private cloud
  • PRIVATE_CLOUD_NAME: the name of the private cloud
  • DOMAIN: the domain to be forwarded
  • DNS_SERVER_IP1,DNS_SERVER_IP2,....: a comma-separated list of IPv4 addresses for the authoritative DNS server

API

Create a POST request. You can add one or more rules to each request.

curl -X POST -H "Authorization: Bearer
TOKEN
"  -H "Content-Type: application/json; charset=utf-8"
https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PRIVATE_CLOUD_NAME/dnsForwarding -d '{"forwardingRules": [
    {
      "domain": "DOMAIN",
      "nameServers": [
        "DNS_SERVER_IP1",
        "DNS_SERVER_IP2"
      ]
    },
    {
      "domain": "DOMAIN",
      "nameServers": [
        "DNS_SERVER_IP1",
        "DNS_SERVER_IP2"
      ]
    }
  ]}

Replace the following:

  • PROJECT_ID: the ID for your project where the private cloud is located
  • ZONE: the zone for the private cloud
  • PRIVATE_CLOUD_NAME: the name of the private cloud
  • DOMAIN: the domain to be forwarded
  • DNS_SERVER_IP1,DNS_SERVER_IP2,....: a comma-separated list of IPv4 addresses for the authoritative DNS server

Describe DNS forwarding rules

To describe DNS forwarding rules in your project, use one of the following methods.

Console

To describe a DNS forwarding rule for a private cloud by using the Google Cloud console, complete the following steps:

  1. Access the Google Cloud console.
  2. From the main navigation, click Private clouds.
  3. Select the private cloud to create a rule for.
  4. On the private clouds summary page, click DNS.

gcloud

To create a DNS forwarding rule for a private cloud, use the gcloud vmware private-clouds dns-forwarding describe.

gcloud vmware private-clouds dns-forwarding describe \
    --project=PROJECT_ID \
    --location=ZONE \
    --private-cloud=PRIVATE_CLOUD_NAME

Replace the following:

  • PROJECT_ID: the ID for your project where the private cloud is located
  • ZONE: the zone for the private cloud
  • PRIVATE_CLOUD_NAME: the name of the private cloud

API

Create a POST request.

POST https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/ZONE/privateClouds/PRIVATE_CLOUD_ID/dnsForwarding

Replace the following:

  • PROJECT_ID: the ID for your project where the private cloud is located
  • ZONE: the zone for the private cloud
  • PRIVATE_CLOUD_NAME: the name of the private cloud