(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. In the Google Cloud console, go to the Private clouds page.

    Go to Private clouds

  2. Select the private cloud to create a rule for.

  3. On the private clouds summary page, click DNS.

  4. Click Add rule.

  5. 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 command. You can specify multiple rules by using multiple --rule flags 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. In the Google Cloud console, go to the Private clouds page.

    Go to Private clouds

  2. Select the private cloud to create a rule for.

  3. 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 command:

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