Note:

Configure two way domain name resolution for Oracle Cloud Infrastructure and On-Premises services

Introduction

Domain Name System (DNS) is a common service used in On-Premises environments, however once you are in the cloud the same technology can be applied but with particular configurations. Name Resolution can be useful if you want to access systems, computers, services and other resources using the common names you already have without hardcoding IP addresses on your applications.

Objective

Configure two way domain name resolution for Oracle Cloud Infrastructure (OCI) and On-Premises services.

Prerequisites

  1. Access to Oracle Cloud Infrastructure (OCI) console with enough IAM permissions to configure VCN service check. For more details, see Required IAM Service Policy.
  2. On-Premises DNS Server (Installation not covered in this tutorial).
  3. OCI VCN deployed with public and private subnets (initial configuration not covered in this tutorial).
  4. Connectivity between OCI and On-Premises (FastConnect or VPN deployment is not covered in this tutorial).
  5. Connectivity between OCI and On-Premises (On-Premises security access list, OCI Security list or Network security groups) to allow DNS traffic flow (for example, TCP/UDP port 53, and so on).
  6. In this tutorial we will use 2 servers, one deployed on OCI, one deployed On-Premises. Ensure you have this set up and have access to these servers to run name resolution tests.

Considerations:

  1. Connectivity between OCI Subnet A (10.0.0.0 /24) and On-Premises Subnet (172.16.11.0 /24) where example.local DNS server resides. The detailed steps for establishing connectivity are out of scope for this tutorial. For more information, see FastConnect, DRG, VPN documentation.
  2. The user who configures the OCI DNS must have enough privileges to make changes on VCN. Policies definition is out of scope for this tutorial. For more details, see Required IAM Service Policy.

Topology

This tutorial uses the following topology:

Topology

DNS Service on OCI

When you initially create a VCN and subnets, you may specify DNS labels for each. Subnet DNS labels can only be set if the VCN itself is created with a DNS label. The labels, along with the parent domain of oraclevcn.com form the VCN domain name and subnet domain name:

When you launch an instance, you may assign a hostname. It is assigned to the VNIC that is automatically created during instance launch (the primary VNIC). Along with the subnet domain name, the hostname forms the fully qualified domain name (FQDN):

For example: instance-remote.publicsubnet.vcnremote.oraclevcn.com.

Task 1: Set up the initial configuration

On-Premises initial state

OCI initial state

Task 2: Set up the OCI environment

In order to resolve DNS entries from On-Premises to OCI, we will create some rules on both DNS. These rules will forward DNS queries to specific domains as required. On-Premises queries looking for OCI domains will be forwarded to OCI DNS Service; OCI queries looking for On-Premises domains will be forwarded to On-Premises DNS Server.

Note: DNS Resolver has impact at VCN level, any change on it will apply to all Subnets within.

  1. Navigate to the VCN Details page and verify the DNS Resolver configuration

    VCN Resolver

  2. In the VCN/DNS Resolver Details page, click Create Endpoint. You can select Listening or Forwarding as described in the following steps.

    Create Endpoint 1

Create Endpoint 4

Note:

Set up the forwarding Rules

We will create a rule to forward all DNS queries from example.local domain to On-Premises DNS Server (172.16.11.55). This rule will match all DNS queries to example.local domain and will forward this query to 172.16.11.55 IP looking for name resolution.

  1. Go to VCN/Private Resolver Details, Rules/Manage Rules.

    Create Rule 1

    Create Rule 2

    A. Select Domain or CIDR Block to match rules, in this tutorial, we will use Domains.

    B. You can add up to 10 domain entries to match the rule, you should group all the domains who share the same Destination DNS IP Address entry.

    C. Select the Source Endpoint to forward queries, remember this IP should be routed and allowed on different access lists through VPN/FastConnect connection.

    D. Enter the destination On-Premises DNS Server IP address.

Task 3: Set up the On-Premises environment

We are working with Microsoft® DNS Service running in a Domain Controller, we will create a conditional forward rule to forward all DNS queries looking for oraclevcn.com domain to OCI DNS Resolver Service.

  1. In DNS Manager configuration page, right-click Conditional Forwarders/New Conditional Forwarder.

    On-Premises 1

    On-Premises 2

    A. Enter the OCI DNS name you want to resolve from the On-Premises network.

    B. Enter the OCI Listener Endpoint [IP Address].

    C. Click OK.

On-Premises 3

Now we have the DNS names resolution configured both ways from OCI to On-Premises and vice-versa.

Task 4: Test the configuration

Test the configuration and the results should be similar to the following screenshots.

On-Premises to OCI

On-Premises-2-OCI

OCI to On-Premises

OCI-2-On-Premises

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.