Atomia Cloud Hosting Platform

Reverse DNS

16 views 0

Overview

Reverse DNS is used to define the domain name associated with an IP address. In Atomia a DNS zone with a PTR record towards a randomized (the OpenStack ID of the virtual machine) hostname is automatically created in the defined VPS zone for any virtual machine that is provisioned from the User Panel. This is done through our DNS software Atomia DNS.

Configuring reverse DNS

Important!

When working with configuration files in Atomia software, it is important that you edit them through transformation files. Please consult our documentation before editing any configuration files. If the files are edited directly the changes will be overwritten by any updates to Atomia.

The only configuration needed to be done in most cases is in the Automation Servers’s resource description, which is found in the following location: C:\Program Files (x86)\Atomia\AutomationServer\Common\Resources.xml

Find the configuration for the module IpToReverseLookup in this file. See example below.

<bindings>
    <moduleList>
      <module name="Atomia.Provisioning.Modules.IpToReverseLookup.IpToReverseLookup" resourceAsignmentPolicy="RoundRobin"/>
    </moduleList>
    <resourceList>
      <resource name="DummyResorurce">
        <property name="IpRanges">10.0.0.0/24;192.168.0.0/24</property>
      </resource>
    </resourceList>
  </bindings>

Type in the IP ranges that your virtual machines are created in, separated by a semicolon.

If you want to look further into how the provisioning of the service is done, it is defined in the provisioning description for the CsVPSInstance complex service located at: C:\Program Files (x86)\Atomia\AutomationServer\Common\ProvisioningDescription.xml

          <add partName="CsVPSDomainReverseZone">
            <initPropertyList>
              <propertyTransformation>
                <simpleTransformer>
                  <serviceProperty name="DnsZone">
                    <expression>$CsVPSInstance/$IpToReverseLookup::RecordLabel+\-+$CsVPSInstance/$IpToReverseLookup::RecordLabel+\.+$CsVPSInstance/$IpToReverseLookup::ReverseZoneLabel</expression>
                  </serviceProperty>
                  <serviceProperty name="Domain">
                    <expression>$CsVPSInstance/$IpToReverseLookup::RecordLabel+\-+$CsVPSInstance/$IpToReverseLookup::RecordLabel+\.+$CsVPSInstance/$IpToReverseLookup::ReverseZoneLabel</expression>
                  </serviceProperty>
                </simpleTransformer>
              </propertyTransformation>
            </initPropertyList>
            <add partName="CsVPSDnsZoneReverse">
            </add>
          </add>

If you for some reason would not like a reverse DNS record to be created, simply remove this section.

Results example

In the example below a virtual machine is provisioned with the IP address of 185.69.44.150.

The zone 150-150.44.69.185.in-addr.arpa is automatically created to reflect this and a PTR record is created for f7f5acf1-1207-4bc3-8507-023d390ca0e2.cloud.demo.atomia.com.

atomiadnsclient --method GetZone --arg 150-150.44.69.185.in-addr.arpa
$VAR1 = [
          {
            'records' => [
                         {
                           'ttl' => '86400',
                           'label' => '@',
                           'class' => 'IN',
                           'id' => '7109',
                           'type' => 'NS',
                           'rdata' => 'ns2.demo.atomia.com.'
                         },
                         {
                           'ttl' => '86400',
                           'label' => '@',
                           'class' => 'IN',
                           'id' => '7108',
                           'type' => 'NS',
                           'rdata' => 'ns1.demo.atomia.com.'
                         },
                         {
                           'ttl' => '3600',
                           'label' => '@',
                           'class' => 'IN',
                           'id' => '7105',
                           'type' => 'SOA',
                           'rdata' => 'ns1.demo.atomia.com. registry.demo.atomia.com. %serial 1200 180 1209600 1209600'
                         }
                       ],
            'name' => '@'
          },
          {
            'records' => [
                         {
                           'ttl' => '3600',
                           'label' => '150',
                           'class' => 'IN',
                           'id' => '7110',
                           'type' => 'PTR',
                           'rdata' => 'f7f5acf1-1207-4bc3-8507-023d390ca0e2.cloud.demo.atomia.com.'
                         }
                       ],
            'name' => '150'
          }
        ];

With the dig command we perform a reverse DNS lookup and verify the results.

dig +noall +answer -x 185.69.44.150
150.44.69.185.in-addr.arpa. 3600 IN     CNAME   150.150-150.44.69.185.in-addr.arpa.44.69.185.in-addr.arpa.

Was this helpful?