{"id":154,"date":"2017-07-03T15:39:53","date_gmt":"2017-07-03T15:39:53","guid":{"rendered":"https:\/\/newdelhihosting.co.in\/blog\/?p=154"},"modified":"2024-10-22T10:47:43","modified_gmt":"2024-10-22T10:47:43","slug":"how-to-install-bind-dns-server-on-vps","status":"publish","type":"post","link":"https:\/\/www.newdelhihosting.co.in\/blog\/how-to-install-bind-dns-server-on-vps\/","title":{"rendered":"Steps to install bind dns server on VPS"},"content":{"rendered":"<p style=\"text-align: left;\"><strong>DNS Server:-<\/strong><br \/>\nA <a href=\"https:\/\/en.wikipedia.org\/wiki\/Domain_Name_System\" target=\"_blank\" rel=\"noopener\">DNS <\/a>Server is a computer server that contains a database of public ip address and their hostnames.<\/p>\n<p><strong><u>Install bind dns server on centos6<\/u><\/strong><\/p>\n<p>Step1:-<\/p>\n<pre>Checking updates with \u201cyum update -y\u201d<\/pre>\n<p>Step2:-<\/p>\n<pre>Install bind with \u201c yum install bind bind-utils -y\u201d<\/pre>\n<p>Step3:-<\/p>\n<pre>Will open named.conf with \u201cnano \/etc\/named.conf\u201d<\/pre>\n<p>Replacing *.*.*.* with corresponding ip address<br \/>\n<!--more--><\/p>\n<pre>options {\r\n        #listen-on port 53 { 127.0.0.1; };\r\n        listen-on-v6 port 53 { ::1; };\r\n        directory       \"\/var\/named\";\r\n        dump-file       \"\/var\/named\/data\/cache_dump.db\";\r\n        statistics-file \"\/var\/named\/data\/named_stats.txt\";\r\n        memstatistics-file \"\/var\/named\/data\/named_mem_stats.txt\";\r\nallow-query { any; };\r\n        allow-transfer     { localhost; *.*.*.*; };\r\n        recursion no;\r\n\r\n        dnssec-enable yes;\r\n        dnssec-validation yes;\r\n\r\n        \/* Path to ISC DLV key *\/\r\n        bindkeys-file \"\/etc\/named.iscdlv.key\";\r\n\r\n        managed-keys-directory \"\/var\/named\/dynamic\";\r\n};<\/pre>\n<p>Above,listen-on must be commented.Recursion should be turn off to prevent server from being abused in &#8220;reflection&#8221; attacks<br \/>\nStep4:-<br \/>\nNext,Add the new zone for domain,you should add the following to your named.conf below the existing zones<\/p>\n<pre>zone \"domainname.com\" IN {\r\n                type master;\r\n                file \"domainname.com.zone\";\r\n                allow-update { none; };\r\n        };\r\n<\/pre>\n<p><strong>Save zone file<\/strong><br \/>\nStep5:-Next,Need to open zone file and set A,MX,CNAME records and replace corresponding ip address instead of 11.11.11.11 and replace domain name instead of example.com<\/p>\n<pre>$TTL 86400\r\n@   IN  SOA     ns1.example.com. root.example.com. (\r\n        2013042201  ;Serial\r\n        3600        ;Refresh\r\n        1800        ;Retry\r\n        604800      ;Expire\r\n        86400       ;Minimum TTL\r\n)\r\n; Specify our two nameservers\r\n                IN      NS              ns1.example.com.\r\n                IN      NS              ns2.example.com.\r\n; Resolve nameserver hostnames to IP, replace with your two droplet IP addresses.\r\nns1             IN      A               11.11.11.11\r\nns2             IN      A               11.11.11.11\r\n;Specify MX record\r\ndarzilla.com.   IN      MX      10      mail.example.com.\r\ndarzilla.com.   IN      A       11.11.11.11\r\n; Define hostname ; IP pairs which you wish to resolve\r\n@               IN      A               11.11.11.11\r\nwww             IN      CNAME           example.com.\r\nmail            IN      A               11.11.11.11\r\n<\/pre>\n<p>Step6:-Start restart with &#8220;<strong>servive named restart<\/strong>&#8221;<br \/>\nStep7:-Enable startup service &#8220;<strong>chkconfig named on<\/strong>&#8221;<br \/>\nStep8:-You can verify that is fully operational by using dig again,replacing 1.1.1.1. with the ip of you.<\/p>\n<pre>dig @1.1.1.1.1 example.com<\/pre>\n<p>Step9:-After any changes you make to the master zone files,you will need to instruct BIND to reload.To reload the zone files,we need to run the following command on the master name server.<\/p>\n<pre>rndc reload<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DNS Server:- A DNS Server is a computer server that contains a database of public ip address and their hostnames. Install bind dns server on centos6 Step1:- Checking updates with \u201cyum update -y\u201d Step2:- Install bind with \u201c yum install bind bind-utils -y\u201d Step3:- Will open named.conf with \u201cnano \/etc\/named.conf\u201d Replacing *.*.*.* with corresponding ip&#8230;<\/p>\n","protected":false},"author":1,"featured_media":425,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps-2"],"jetpack_featured_media_url":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/bind-dns.jpg","_links":{"self":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":14,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":473,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions\/473"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media\/425"}],"wp:attachment":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}