{"id":5561,"date":"2016-11-22T10:31:56","date_gmt":"2016-11-22T10:31:56","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=5561"},"modified":"2021-02-02T05:13:45","modified_gmt":"2021-02-02T05:13:45","slug":"setup-dns-server-debian","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/","title":{"rendered":"How to Setup Your Own DNS Server on Debian"},"content":{"rendered":"<p><span style=\"color: #000000;\">In this tutorial i will explains how to setup a DNS server using Bind9 on Debian server. Throughout the article, Replace your-domain-name.com accordingly. At the end of the tutorial, you will have a working Debina DNS server.<\/span><!--more--><\/p>\n<h3><span style=\"color: #000000;\">PREREQUISITES<\/span><\/h3>\n<ol>\n<li><span style=\"color: #000000;\">A SSH client like<\/span> <a href=\"https:\/\/cpanelplesk.com\/wp62\/using-putty-connect-server-ssh-windows\/\">putty<\/a> <span style=\"color: #000000;\">and basic knowledge to use it<\/span><\/li>\n<li><span style=\"color: #000000;\">A full<\/span><a href=\"https:\/\/cpanelplesk.com\/wp62\/build-working-debian-server-apache-php-mysql\/\"> working Debian server<\/a>.<\/li>\n<li><span style=\"color: #000000;\">About 30 minutes of your time.<\/span><\/li>\n<li><span style=\"color: #000000;\">A cup of coffee or tea.<\/span><\/li>\n<\/ol>\n<h3><span style=\"color: #000000;\">Install Bind9<\/span><\/h3>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>apt-get install bind9<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<h3><span style=\"color: #000000;\">Bind Configuration<\/span><\/h3>\n<p><span style=\"color: #000000;\">First of all Backup current <a href=\"https:\/\/cpanelplesk.com\/wp62\/4836-2\/\">Bind9<\/a> settings.<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>cp \/etc\/bind\/named.conf.options \/etc\/bind\/named.conf.options.bak<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Edit \/etc\/bind\/named.conf.options and replace the content with the following:<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>options {\r\ndirectory \"\/var\/cache\/bind\";\r\nauth-nxdomain no;\r\nlisten-on-v6 { any; };\r\nstatistics-file \"\/var\/cache\/bind\/named.stats\";\r\nrrset-order {order cyclic;};\r\nallow-transfer { 127.0.0.1; };\r\n};\r\nlogging {\r\nchannel b_query {\r\nfile \"\/var\/log\/bind9\/query.log\" versions 2 size 1m;\r\nprint-time yes;\r\nseverity info;\r\n};\r\ncategory queries { b_query; };\r\n};<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Now create the log directory for Bind9.<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>mkdir \/var\/log\/bind9\r\nchown bind:bind \/var\/log\/bind9<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Edit \/etc\/bind\/named.conf to configure your domain zone file location. Append the following lines:<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>zone \"your-domain-name.com\" {\r\ntype master;\r\nfile \"\/etc\/bind\/zones\/your-domain-name.com.db\";\r\n};<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Create your domain zone file at \/etc\/bind\/zones\/your-domain-name.com.db. Insert your DNS records by following this template:<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>$TTL 86400\r\n@ IN SOA ns1.your-domain-name.com. root.your-domain-name.com. (\r\n2014100801 ; Serial\r\n43200 ; Refresh\r\n3600 ; Retry\r\n1209600 ; Expire\r\n180 ) ; Minimum TTL\r\n\r\n; Nameservers\r\nIN NS ns1.your-domain-name.com.\r\nIN NS ns2.your-domain-name.com.\r\nIN NS ns3.your-domain-name.com.\r\n\r\n; Root site\r\nIN A 123.456.78.90\r\n\r\n; Hostname records\r\n* IN A 123.456.78.90\r\nsub1 IN A 123.456.78.91\r\nsub2 IN A 123.456.78.92\r\n\r\n; Aliases\r\nwww IN CNAME your-domain-name.com.\r\nwebmail IN CNAME ghs.google.com.\r\n\r\n; MX records\r\n@ IN MX 1 aspmx.l.google.com.\r\n@ IN MX 3 alt1.aspmx.l.google.com.\r\n@ IN MX 3 alt2.aspmx.l.google.com.\r\n@ IN MX 5 aspmx2.googlemail.com.\r\n@ IN MX 5 aspmx3.googlemail.com.\r\n@ IN MX 5 aspmx4.googlemail.com.\r\n@ IN MX 5 aspmx5.googlemail.com.\r\n\r\n; SPF records\r\n@ IN TXT \"v=spf1 ip4:199.195.140.194 include:_spf.google.com ~all\"<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Restart Bind9<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>\/etc\/init.d\/bind9 restart<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">This is all you have to do. At this point, you may want to register your DNS server with your domain registrar. After doing that, you can change your existing name server to your own DNS server.\u00a0Give your opinion below if you experience any issues or to discuss your ideas and experiences.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial i will explains how to setup a DNS server using Bind9 on Debian server. Throughout the article, Replace your-domain-name.com accordingly. At the end of the tutorial, you will have a working Debina DNS server. [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":5563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-5561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Setup Your Own DNS Server on Debian - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Setup Your Own DNS Server on Debian - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial i will explains how to setup a DNS server using Bind9 on Debian server. Throughout the article, Replace your-domain-name.com accordingly. At the end of the tutorial, you will have a working Debina DNS server. [...]Continue Reading...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Seemab Saleem\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\"},\"author\":{\"name\":\"Seemab Saleem\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\"},\"headline\":\"How to Setup Your Own DNS Server on Debian\",\"datePublished\":\"2016-11-22T10:31:56+00:00\",\"dateModified\":\"2021-02-02T05:13:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\"},\"wordCount\":197,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png\",\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\",\"name\":\"How to Setup Your Own DNS Server on Debian - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png\",\"datePublished\":\"2016-11-22T10:31:56+00:00\",\"dateModified\":\"2021-02-02T05:13:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Setup Your Own DNS Server on Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\",\"name\":\"Seemab Saleem\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"caption\":\"Seemab Saleem\"},\"description\":\"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!\",\"sameAs\":[\"https:\/\/cpanelplesk.com\/wp62\"],\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Setup Your Own DNS Server on Debian - cPanel Plesk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/","twitter_card":"summary_large_image","twitter_title":"How to Setup Your Own DNS Server on Debian - cPanel Plesk","twitter_description":"In this tutorial i will explains how to setup a DNS server using Bind9 on Debian server. Throughout the article, Replace your-domain-name.com accordingly. At the end of the tutorial, you will have a working Debina DNS server. [...]Continue Reading...","twitter_image":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png","twitter_misc":{"Written by":"Seemab Saleem","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/"},"author":{"name":"Seemab Saleem","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648"},"headline":"How to Setup Your Own DNS Server on Debian","datePublished":"2016-11-22T10:31:56+00:00","dateModified":"2021-02-02T05:13:45+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/"},"wordCount":197,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png","articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/","url":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/","name":"How to Setup Your Own DNS Server on Debian - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png","datePublished":"2016-11-22T10:31:56+00:00","dateModified":"2021-02-02T05:13:45+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#primaryimage","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/bind9.png","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/setup-dns-server-debian\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to Setup Your Own DNS Server on Debian"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648","name":"Seemab Saleem","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","caption":"Seemab Saleem"},"description":"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!","sameAs":["https:\/\/cpanelplesk.com\/wp62"],"url":"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/5561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=5561"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/5561\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media\/5563"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=5561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=5561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=5561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}