How to Use CoreDNS as an Integrated DNS Provider
This tutorial will guide you through the process of connecting your CoreDNS instance with DNSimple. By integrating these services, you will be able to manage your CoreDNS zones directly from your DNSimple account, simplifying DNS management for your on-premise or self-hosted services.
You can follow along with the video below, or use it as a reference as you go through the numbered steps.
The Integrations link in the navigation menu referenced in the video has been deprecated. After connecting CoreDNS to your DNSimple account as an Integrated DNS Provider, use the DNS Zone Providers card in the DNS section of your domain’s management page to add, remove, or delete CoreDNS configuration for a zone.
1. Prerequisites
Before you begin, ensure you have the following:
- A DNSimple account.
- A running CoreDNS instance with the
coredns-dnsimpleplugin installed. You can either use the official DNSimple CoreDNS Binary or the DNSimple CoreDNS Docker Container. - A DNSimple API access token and account ID for the account you want to connect.
2. Setting up the integration
This section will prepare your CoreDNS instance to sync with your DNSimple account.
Configure CoreDNS
- Edit your
Corefileand add adnsimpleplugin block for each zone you want to sync. TheCorefileshould include your API access token and account ID.
For example, to syncexample.comandexample.org, yourCorefilewould look like this:
example.com {
dnsimple example.com {
access_token YSHAMES7AMTNMo7qHLGUkkg06p4rs
account_id 131072
}
}
example.org {
dnsimple example.org {
access_token YSHAMES7AMTNMo7qHLGUkkg06p4rs
account_id 131072
}
}
- Restart your CoreDNS instance to load the new configuration.
3. Syncing DNS records
Once the integration is set up, you can synchronize records from DNSimple to CoreDNS.
One-way sync
The CoreDNS Integrated Provider supports a one-way sync from DNSimple to CoreDNS. All records configured for the zone at DNSimple will be synced to CoreDNS on startup and again during each refresh interval.
To sync records from DNSimple to CoreDNS:
- Go to the relevant zone in your DNSimple account.
- Add or edit records in the DNSimple record editor.
- The CoreDNS instance will automatically sync these changes on its next refresh interval.
4. Verification
The best way to validate that your integration is working is to perform a check using a tool like dig.
- Open your terminal and use
digto query for a record you’ve synchronized, specifying your CoreDNS instance as the server.- E.g.,
dig @localhost -p 53 example.com
- E.g.,
- The
ANSWER SECTIONof the output should show the IP address you expect, confirming that the record is being served correctly by your CoreDNS instance.
Have more questions?
If you have additional questions or need any assistance with your Integrated DNS Providers, just contact support, and we’ll be happy to help.