{"id":663,"date":"2021-07-05T19:57:02","date_gmt":"2021-07-05T19:57:02","guid":{"rendered":"https:\/\/www.spktechfit.com\/?p=663"},"modified":"2021-07-05T19:57:02","modified_gmt":"2021-07-05T19:57:02","slug":"21-configure-name-resolution","status":"publish","type":"post","link":"https:\/\/www.spktechfit.com\/?p=663","title":{"rendered":"21. Configure Name Resolution"},"content":{"rendered":"<h1>Azure DNS Services<\/h1>\n<p>DNS is like the phone book for the internet, it is how the domain names get translated to IP addresses.<\/p>\n<h2>Azure DNS Service Options<\/h2>\n<p>There are 3 main options<\/p>\n<ol>\n<li><b>Azure provides DNS (default)<br \/>\n<\/b>&#8211; no configuration required<br \/>\n&#8211; can use hostnames to connect to machines on the same VNet without requiring FQDN<\/li>\n<li><b>You provide DNS (run your own DNS server)<br \/>\n<\/b><\/li>\n<li><b>Azure Private DNS<\/b><br \/>\n&#8211; this allows you run your own DNS services<br \/>\n&#8211; create your own custom domain names and have them recognised by your VMs. EG: dev.local, staging.local<br \/>\n&#8211; Only valid your own VNet, not valid on the internet<br \/>\n&#8211; Doesn&#8217;t have to be registered<br \/>\n&#8211; can have 2 &#8211; 34 labels: something.something<br \/>\n&#8211; works from VNet to VNet for VMs<br \/>\n&#8211; does not work for App Services<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h1>Create a Private DNS Zone<\/h1>\n<ol>\n<li>From the Azure portal, search for &#8220;Private DNS zones&#8221;<\/li>\n<li>Click on Create<\/li>\n<li>Set subscription and Resource Group<\/li>\n<li>Give the zone a name, eg: myzone.local<\/li>\n<li>Set the location<\/li>\n<li>Click on Create<\/li>\n<\/ol>\n<h2>Link DNS zone to VNet<\/h2>\n<p>To use the DNS zone we need to link it to a Virtual Network<\/p>\n<ol>\n<li>Go to the newly created DNS zone<\/li>\n<li>Go to &#8220;Virtual Network Links&#8221;<\/li>\n<li>Click on Add<\/li>\n<li>Give the Network Link a name<\/li>\n<li>Set the subscription<\/li>\n<li>Choose the VNet from the dropdown list<\/li>\n<li>Enable Auto registration: as servers are created in the resource group they will get auto added to the DNS zone.<\/li>\n<li>Click OK<\/li>\n<\/ol>\n<h3>Testing DNS Zone<\/h3>\n<ol>\n<li>Now add two VM&#8217;s to the VNet that the DNS zone is linked to.<\/li>\n<li>Go to the Private DNS Zone and you should see the two VMs records listed\u00a0 with their names and IP addresses<\/li>\n<li>From here you can also manually add records<\/li>\n<li>Now you should be able to access the VMs using their names<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h1>Create a Public DNS Zone<\/h1>\n<p>Before setting this up you will need a registered domain name that can be recognised from the internet. By setting this up Azure will be managing your Domains DNS.<\/p>\n<ol>\n<li>From the Azure portal, search for &#8220;DNS zones&#8221;<\/li>\n<li>Click on Create DNS Zone<\/li>\n<li>Set subscription and Resource Group<\/li>\n<li>Give the zone a name, this is the registered domain name<\/li>\n<li>Set the location<\/li>\n<li>Click on Create<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>Managing the Public DNS Zone<\/h2>\n<p>Go to the zone once It is created. You will see the existing records and the name servers for your domain.<\/p>\n<p>Using Azure DNS for your domain:<\/p>\n<ol>\n<li>Go to the registrar of your domain and login<\/li>\n<li>Go to the DNS settings and enter the Azure Name servers found in your Azure DNS Zone<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Azure DNS Services DNS is like the phone book for the internet, it is how the domain names get translated to IP addresses. Azure DNS Service Options There are 3 main options Azure provides DNS (default) &#8211; no configuration required &#8211; can use hostnames to connect to machines on the same VNet without requiring FQDN [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/663"}],"collection":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=663"}],"version-history":[{"count":1,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/663\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/663\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}