travis' brain dump

Archive for July, 2020

Import DNS Files to Azure DNS

by on Jul.23, 2020, under Tech Stuff

Because I literally forgot how to do this and had to look it up and don’t want to suffer through a long MSFT document again in the future….

Super short version FTW:

  • Setup a new DNS zone in Azure. This is pretty easy, but in case you need it: https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal
  • Gather your dns file…
    • Windows – C:\Windows\System32\dns
    • Bind – Wherever you specified to drop those things for named to pick up (usually somewhere in /etc/namedb/ or /usr/local/etc/namedb/)
  • Mod the file and pull out the NS records. Import doesn’t seem to like these despite what the doc’s say. 🙂
  • Start Azure CLI (Cloudshell/Bash). If you don’t know how to use this, check this link: https://docs.microsoft.com/en-us/azure/cloud-shell/overview
  • Upload your .dns file using the CloudShell console. I suggest you move the file into a working directory if you’d like to store it for later.
  • Execute Order 66… err… this command:
    • az network dns zone import -g domain-services -n domain.net -f domain.net.dns
  • Profit

You should see a message along the lines of ‘== 41/41 RECORDS IMPORTED SUCCESSFULLY: ‘domain.net’ ==’ when completed, however you may want to go in and recheck the import and maybe make a few mods to any records you want to modify TTLs on, etc. Any TTLs not explicitly defined will set to 3600 so make sure to cleanup what you need, where you need.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!