{"id":106,"date":"2022-03-16T04:29:03","date_gmt":"2022-03-16T03:29:03","guid":{"rendered":"http:\/\/linowebserver.org\/?page_id=106"},"modified":"2022-09-15T22:49:58","modified_gmt":"2022-09-15T20:49:58","slug":"how-to-configure-bind9","status":"publish","type":"page","link":"https:\/\/linowebserver.org\/index.php\/how-to\/how-to-configure-bind9\/","title":{"rendered":"How to: configure Bind9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Get the Bind9 package <\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install bind9 bind9-dnsutils <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configure named.conf.option<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">File: \/etc\/bind\/named.conf.option\n <a>options {<\/a>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; directory \"\/var\/cache\/bind\";\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth-nxdomain no;&nbsp;&nbsp;&nbsp; # conform to RFC1035\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ contains a list of servers to which queries should\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ be forwarded (up to three servers may be listed)\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forwarders { 1.1.1.1; 8.8.8.8; };\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ prefer usage of the name server declared in the\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ forwarders section\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward first;\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ network interfaces to listen on and optionally the\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ port for IPv4\/IPv6 (default: 'port 53'\/'any')\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen-on port 53 { 127.0.0.1; 192.168.168.231; };\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listen-on-v6 { none; };\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ may be needed if a firewall stands between the local\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ server and the internet\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/query-source address * port 53;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/transfer-source * port 53;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/notify-source * port 53;\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ networks or IP addresses to accept queries from\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ (default: allow from all hosts)\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-query { 127.0.0.1; 192.168.168.0\/28; };\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ hosts allowed to make recursive queries\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-recursion { 127.0.0.1; 192.168.168.0\/28; };\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ hosts are allowed to receive zone transfers\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/allow-transfer { none; };\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-transfer { 127.0.0.1; };\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ specifies, whether notify messages are sent to\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ other name servers when the the zone data is changed\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; notify no;\n };\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Zone Configuration<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Your local zone must be specified like this<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>File: \/etc\/bind\/named.conf.local<\/strong>\n\nzone \"myDomainToConfigure.local\" {\n &nbsp; type master;\n &nbsp; file \"\/etc\/bind\/db.myDomainToConfigure.local\";\n };\n &nbsp;\n zone \"168.168.192.in-addr.arpa\" {\n &nbsp; type master;\n &nbsp; file \"\/etc\/bind\/db.168.168.192\";\n }; \n\n\n\n<em>Don't forget the fucking \".\" dot after ur FQDN-Domain-Name<\/em>\nCreate ur domain database Files.\n\nSet the serial to the Date of now.\nChange <strong><em>myBindServerName<\/em><\/strong> and <strong><em>myMailServer<\/em><\/strong> to ur network configuration\n\n<strong>File: \/etc\/bind\/db.myDomainToConfigure.local<\/strong>\n$TTL 3600\n @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN SOA <strong>myBindServerName<\/strong>.myDomainToConfigure.local.&nbsp; root.myDomainToConfigure.local. (\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><em>2022031601<\/em><\/strong>&nbsp;&nbsp;&nbsp; ; serial\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; refresh\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; retry\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; expire\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3600 )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; minimum\n &nbsp;\n @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>myBindServerName<\/strong>.linowebserver.org.&nbsp; ; nameserver\n @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN MX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10 <strong>myMailServer<\/strong>.linowebserver.org.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; mailserver\n &nbsp;\n ; domain to IP mappings\n @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  <strong>192.168.168.1<\/strong>\n <strong>myBindServerName<\/strong>.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>192.168.168.1<\/strong>\n <strong>myMailServer<\/strong>.           IN A          <strong>192.168.168.2<\/strong>\n ur clients..... \n\n\n<strong><em>File: \/etc\/bind\/db.168.168.192<\/em><\/strong>\n\n $TTL 3600\n 168.168.192.in-addr.arpa.&nbsp; IN SOA <strong>myBindServerName<\/strong>.<strong>myDomainToConfigure.local.<\/strong>&nbsp; root.<strong>myBindServerName<\/strong>.<strong>myDomainToConfigure.local.<\/strong> (\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><em>2022031601<\/em><\/strong>&nbsp;&nbsp;&nbsp; ; serial\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; refresh\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; retry\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; expire\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3600 )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; minimum\n &nbsp;\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp; <strong>myBindServerName<\/strong>.<strong>myDomainToConfigure.local.<\/strong>\n &nbsp;\n ; IP to domain mappings\n 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR <strong>myBindServerName<\/strong>.<strong>myDomainToConfigure.local.<\/strong>\n 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN PTR <strong>myMailServer<\/strong>.<strong>myDomainToConfigure.local.<\/strong>\n x           IN PTR ur clients ...<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Keep in ur mind<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>U Have to create the &#8222;db&#8220; files manual of ur Network-Configuration. <\/li><li>Change the searial to the actually Date followed by 01<\/li><li>all domains entrys followed by a dot. <\/li><li>change the PTR DB file to ur networ-configuation<\/li><li>change the IP and Hostname to ur configuration<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Get the Bind9 package Configure named.conf.option File: \/etc\/bind\/named.conf.option options { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; directory &#8222;\/var\/cache\/bind&#8220;; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth-nxdomain no;&nbsp;&nbsp;&nbsp; # conform to RFC1035 &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ contains a list of servers to which queries should &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ be forwarded (up to three servers may be listed) &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forwarders { 1.1.1.1; 8.8.8.8; }; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ prefer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":58,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-106","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":2,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/106\/revisions"}],"predecessor-version":[{"id":321,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/106\/revisions\/321"}],"up":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/58"}],"wp:attachment":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/media?parent=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}