Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

DNS Scripts for Azure

This directory contains some sample scripts for various DNS operations in Microsoft Azure.

Note: these scripts are not intended for production usage. Please use them only as a basis for your own tailored scripts.

To use a bootstrap script:

  • Copy it to the "bootstrap scripts" section for instance templates in the Cloudera Altus Director UI. OR
  • Update the bootstrapScripts section for instance templates in your Cloudera Altus Director configuration file.

DNS record update scripts

These scripts assume there is a DNS server already set up with proper zone files, and that VM hosts have permission to update DNS records.

This is a sample bootstrap script that sets up automatic DNS record updating, using dhclient, for CentOS and RHEL 6 VMs provisioned by Altus Director.

This is a sample bootstrap script that sets up automatic DNS record updating, using Network Manager, for CentOS and RHEL 7 VMs provisioned by Altus Director.


This is a DHCP client exit hook script that automatically updates DNS records, via nsupdate, when a VM network service is restarted. This script assumes the host VM is running dhclient.

BIND setup scripts

Note: These scripts will bootstrap CentOS and RHEL 6.x and 7.x.

This is a BIND setup script that turns a newly created VM into a BIND server and walks you through changing Azure DNS settings. This script assumes it's running on a newly provisioned VM, or that has been executed (see below).

This is a reset script that walks you through resetting a host's DNS settings back to the default, so that you can run again.

This script runs basic DNS sanity checks (e.g., forward and reverse resolution).


  • The BIND VM must be in the same VNET as the future clusters.
  • Port 53 on the BIND host must be accessible for DNS to work.

Warnings and caveats

  • creates one zone file which supports at most 255 hosts. If required, additional zone files can be added and configured manually.
  • The scripts assume that the Azure nameserver IP address will always be (see here).

Execution walkthrough

  1. On the fresh host that you'll install BIND on, run The script prompts you for the internal host FQDN suffix to use, and then asks you to swap DNS from Azure to BIND. Steps to swap DNS can be found here.

  2. To revert these changes (e.g., to use a different host FQDN suffix, or if the execution of was interrupted), run This reverts everything done in and allows you to re-run

  3. After has completed, run to verify that DNS is correctly functioning on the host. Any errors indicate that there is a problem with the DNS configuration.

You can’t perform that action at this time.