Note:

Protect your Oracle Cloud Infrastructure Internal Network using a DNS Firewall

Introduction

Having control of what your Virtual Machine (VM) instances are doing is essential so that you can control their behavior. In most cases, Domain Name System (DNS) queries are forgotten and not controlled or monitored, leaving the way open for a compromised machine to connect to command and control (C2) servers and download malicious software, for example. Being able control and block these outbound queries to C2 servers and other types of malicious servers, adds an extra layer of security to your network, and you might avoid your VM and network from being further compromised.

Objectives

Prerequisites

Task 1: Locate the DNS Resolver on OCI Console

Make sure you already have a VCN created and click the VCN name. In the Virtual Cloud Network Details page, click DNS Resolver.

OCI_DNS-DNS_Resolver

Task 2: Configure a Forwarding Endpoint

  1. Under Resources, click Endpoints and Create Endpoint.

  2. In the Create endpoint page, enter the following information and click Create Endpoint.

    • Name: Enter a name.
    • Subnet: Select the subnet where you want your forwarder endpoint.
    • Endpoint type: Select Forwarding.

    OCI_DNS-Forwarder_Creation

    It should take a couple of minutes and when finished, you will have your DNS forwarder created. This will allow us to configure a redirect of queries where we want to, in our case to a DNS firewall.

    The DNS resolver follows an order on how the queries of the instances are resolved:

    First, it will check all attached private views, then the resolver rules and last it uses Oracle’s own public Internet resolvers to resolve hostnames. For more information, see Configuration and Resolution.

    In the next step, we want to divert all queries that are not local (do not exist in any private view) and send them to a DNS firewall service, or some other DNS server managed by your company to control the queries.

    You can opt by choosing a free service, like OpenDNS, Quad9, ControlD, and many others, or choose a paid service with much more control and features, like Cisco Umbrella, ControlD, NextDNS, InfoBlox and many more.

    Note: We have no connection with the DNS providers mentioned in Task 3. They are used as an example due to the simplicity, ease of use and configuration. There are many other vendors providing similar services, find the one that best suits your requirements.

Task 3: Create a Resolver Rule

Notes:

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.