{"id":637,"date":"2019-12-20T12:13:33","date_gmt":"2019-12-20T12:13:33","guid":{"rendered":"http:\/\/michaelstoica.com\/?p=637"},"modified":"2020-03-18T10:00:19","modified_gmt":"2020-03-18T10:00:19","slug":"ubuntu-dns-server-for-vmware-environment","status":"publish","type":"post","link":"https:\/\/michaelstoica.com\/site\/ubuntu-dns-server-for-vmware-environment\/","title":{"rendered":"Ubuntu DNS Server for VMware environment"},"content":{"rendered":"<p>While I was rebuilding\u00a0my homelab from scratch , I thought that would be a good idea to setup the DNS server for my VMware environment on a Ubuntu server.<\/p>\n<p>So I installed Ubuntu server on a VM and after the installation finished I did a\u00a0<em>sudo apt-get update &amp;&amp; sudo apt-get upgrade\u00a0<\/em> and then installed BIND to configure DNS\u00a0<em>sudo apt-get install bind9.<\/em><\/p>\n<p>Once installed go to\u00a0<em>\/etc\/bind<\/em> and here add the zone in\u00a0<em>named.conf.local<\/em><\/p>\n<p>\/\/<\/p>\n<p>\/\/ Do any local configuration here<br \/>\n\/\/<\/p>\n<p>\/\/ Consider adding the 1918 zones here, if they are not used in your<br \/>\n\/\/ organization<br \/>\n\/\/include &#8220;\/etc\/bind\/zones.rfc1918&#8221;;<br \/>\nzone &#8220;mdc.local&#8221;{<br \/>\ntype master;<br \/>\nfile &#8220;\/etc\/bind\/zones\/mdc.local.db&#8221;;<br \/>\n};<br \/>\nzone &#8220;1.168.192.in-addr.arpa&#8221;{<br \/>\ntype master;<br \/>\nfile &#8220;\/etc\/bind\/zones\/rev.1.168.192.in-addr.arpa&#8221;;<br \/>\n};<\/p>\n<p>Now you need to create the zone files:<\/p>\n<p><em>mkdir\u00a0\/etc\/bind\/zones<\/em><\/p>\n<p><em>vim \/etc\/bind\/zones\/mdc.local.db<\/em><\/p>\n<p><em>vim \/etc\/bind\/zones\/rev.1.168.192.in-addr.arpa\u00a0<\/em><\/p>\n<p>This is how it should look like:<\/p>\n<p><strong>mdc.local.db<\/strong><\/p>\n<p>@ 1D IN SOA srv-dns.mdc.local. hostmaster.mdc.local. (<br \/>\n2002022401 ; serial<br \/>\n3H ; refresh<br \/>\n15 ; retry<br \/>\n1w ; expire<br \/>\n3h ; minimum<br \/>\n)<br \/>\nmdc.local. IN NS srv-dns.mdc.local.<\/p>\n<p>srv-dns IN A 192.168.1.10<br \/>\nvcsa IN A 192.168.1.20<br \/>\nesxi01 IN A 192.168.1.17<br \/>\nesxi02 IN A 192.168.1.18<br \/>\nesxi03 IN A 192.168.1.19<\/p>\n<p><strong>rev.1.168.192.in-addr.arpa<\/strong><\/p>\n<p>@ IN SOA srv-dns.mdc.lab.local. admin.mdc.local. (<br \/>\n2006081401;<br \/>\n28800;<br \/>\n604800;<br \/>\n604800;<br \/>\n86400;<br \/>\n)<\/p>\n<p>IN NS srv-dns.mdc.local<br \/>\n10 IN PTR mdc.local<br \/>\n20 IN PTR vcsa.mdc.local<br \/>\n17 IN PTR esxi01.mdc.local<br \/>\n18 IN PTR esxi02.mdc.local<br \/>\n19 IN PTR esxi03.mdc.local<\/p>\n<p>After you configured these you will have to edit\u00a0<em>\/etc\/resolv.conf\u00a0<\/em>as well to add your domain name and IP:<\/p>\n<p>nameserver 192.168.1.10<br \/>\nsearch mdc.local<\/p>\n<p>Now since all the configuration is done you will need to restart BIND using <em>service bind9 restart.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While I was rebuilding\u00a0my homelab from scratch , I thought that would be a good idea to setup the DNS server for my VMware environment&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/michaelstoica.com\/site\/ubuntu-dns-server-for-vmware-environment\/\">Continue reading<span class=\"screen-reader-text\">Ubuntu DNS Server for VMware environment<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[31,35,60,45,50,51,8,13,44,12,42],"class_list":["post-637","post","type-post","status-publish","format-standard","hentry","category-general","tag-esxi","tag-linux","tag-ubuntu","tag-vcenter","tag-vcsa","tag-vexpert","tag-virtualization","tag-vmware","tag-vsan-6-7u1","tag-vsphere","tag-vsphere-6-7","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p63Lge-ah","_links":{"self":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/comments?post=637"}],"version-history":[{"count":7,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/637\/revisions"}],"predecessor-version":[{"id":691,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/637\/revisions\/691"}],"wp:attachment":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/media?parent=637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/categories?post=637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/tags?post=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}