In this article, we will discuss and show a stepwise method of how to configure OctoDNS or GeoDNS or Dynamic DNS in NS1 [NSone]. OctoDNS is an open-source, infrastructure-as-code tool designed for managing DNS resources (zones, records, etc.) across multiple DNS providers. It allows you to store DNS configurations in .yaml files and deploy changes via GitHub as a mechanism for version control. In this way, organizations can implement multi-provider DNS solutions and maintain a single source of truth while limiting time-consuming maintenance or human error. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git development began in April 2005 and Development of the GitHub.com platform began on October 19, 2007.
Configuration
Configuring GeoDNS is complex and the details of the functionality vary widely from provider to provider. OctoDNS has an opinionated view mostly to give a reasonably consistent behaviour across providers. Follow the steps shown below to configure GeoDNS in NS1.
Step1: DNS Record
Here we need to define or select the record for which we are configuring GeoDNS or OctoDNS. In this scenario, we will configure GeoDNS or OctoDNS for “edledge“
--- edledge:
Step2: Dynamic
This is going to be a dynamic record used with the providers that support it.
dynamic:
Step3: Pools
There are pools of records that can be referenced and thus used by rules. Pools are “APAC, “EU or EMEA” and “AMER“.
pools: apac: fallback: failover values: - value: 1.1.1.1 - value: 2.2.2.2 eu: fallback: failover
values: - value: 3.3.3.3 weight: 2 - value: 4.4.4.4 weight: 3
amer:
fallback: failover
values:
- value: 5.5.5.5
weight: 4
- value: 6.6.6.6
weight: 5
Step4: Weight
Define the weight or priority of the IP of the pool. If nothing is defined then the default weight is 1
Step5: Fallback
We could define an optional fallback so that if all the records in the respective pool fail then the fallback pool should be tried.
failover:
values:
- value: 7.7.7.7
- value: 8.8.8.8
- value: 9.9.9.9
Step6: Rules
Rules are defined sets of logic which assign queries to pools.
rules: - geos: - AF-ZA - AS - OC pool: apac - geos: - AF - EU pool: eu
- geos:
- NA
- SA
pool: amer
- pool: failover
Step7: Geos
Geos are the predefined locations which are used in matching queries. Geos get defined with the rules as shown above in Step 5.
Step8: Health Checks
OctoDNS will automatically configure the provider to monitor each IP and check for a 200 response for https://<ip_address>/_dns. These checks can be customized via the healthcheck configuration options.
ededge:
octodns:
healthcheck:
host: edledge.com
path: /dns-health-check
port: 80
protocol: HTTP
Final Configuration
Below is an example of the final octoDNS or Geolocation DNS configuration for the record “edledge.com“.
edledge:
dynamic:
pools:
apac:
fallback: failover
values:
- value: 1.1.1.1
- value: 2.2.2.2
eu:
fallback: failover
values:
- value: 3.3.3.3
weight: 2
- value: 4.4.4.4
weight: 3
amer:
fallback: failover
values:
- value: 5.5.5.5
weight: 4
- value: 6.6.6.6
weight: 5
failover:
values:
- value: 7.7.7.7
- value: 8.8.8.8
- value: 9.9.9.9
rules:
- geos:
- AF-ZA
- AS
- OC
pool: apac
- geos:
- AF
- EU
pool: eu
- geos:
- NA
- SA
pool: amer
- pool: failover
octodns:
healthcheck:
host: edledge.com
path: /dns-health-check
port: 80
protocol: HTTP
ttl: 300
type: A
values:
- 3.3.3.3
- 4.4.4.4
- 5.5.5.5
- 6.6.6.6
- 7.7.7.7
- 8.8.8.8
- 9.9.9.9
OctoDNS or Geo DNS is configured for the record “edledge“.
Other important topics
- How to undo or revert the commit in GitHub
- How to Clone a Repository from GitHub
- How to Create Personal Access Token [PAT] in GitHub
- How to Install Git on Windows Machines
- How to Install Git on Linux Machines
Source: Knowledge Base, Internet, Github
EA00149