{"id":970,"date":"2011-07-02T00:09:03","date_gmt":"2011-07-01T22:09:03","guid":{"rendered":"https:\/\/thebc.ch\/blog\/?p=970"},"modified":"2013-02-01T12:52:03","modified_gmt":"2013-02-01T11:52:03","slug":"tinycore-installing-ipv6-enabled-nameserver","status":"publish","type":"post","link":"https:\/\/thebc.ch\/blog\/?p=970","title":{"rendered":"Tinycore &#8211; Installing IPv6 enabled Nameserver"},"content":{"rendered":"<p><a rel=\"attachment wp-att-1059\" href=\"https:\/\/thebc.ch\/blog\/970\/tinycore-installing-ipv6-enabled-nameserver\/draft\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-1059\" style=\"float\" title=\"draft\" src=\"http:\/\/thebc.ch\/upload\/2011\/07\/draft-300x190.jpg\" alt=\"\" width=\"300\" height=\"190\" srcset=\"https:\/\/thebc.ch\/upload\/2011\/07\/draft-300x190.jpg 300w, https:\/\/thebc.ch\/upload\/2011\/07\/draft.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<div class='toc toc'>\n<h2>Contents<\/h2>\n<ul class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Installing_IPv6\">Installing IPv6<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Installing_bind9\">Installing bind9<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Prepare_the_system\">Prepare the system<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Searching_for_bind9\">Searching for bind9<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Installing_bind\">Installing bind<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_usrlocaletcbindnamed.conf\">Create \/usr\/local\/etc\/bind\/named.conf<\/a>\n\t\t\t\t<ul class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Set_ACL_for_zone-transfer\">Set ACL for zone-transfer<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Setting_options\">Setting options{}<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Define_the_DNS-root-servers\">Define the DNS-root-servers<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#The_special_zones_like_loopback_private...\">The \"special\" zones (like loopback, private...)<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv4_reverse_lookup_zone\">IPv4 reverse lookup zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv6_reverse_lookup_zone\">IPv6 reverse lookup zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv4IPv6_forward_lookup_zone\">IPv4\/IPv6 (forward) lookup zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_the_zone_files\">Create the zone files<\/a>\n\t\t\t\t<ul class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv4_reverse_lookup_zone_1\">IPv4 reverse lookup zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv6_reverse_lookup_zone_1\">IPv6 reverse lookup zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IPv4IPv6_forward_zone\">IPv4\/IPv6 (forward) zone<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_start-script\">Create start-script<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Save_configuration\">Save configuration<\/a>\n\t\t\t<\/li>\n\t\t<\/ul>\n\t<li>\n\t\t<a href=\"#Additional_stuff\">Additional stuff<\/a>\n\t\t<ul class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Remote_Name_Daemon_Control\">Remote Name Daemon Control<\/a>\n\t\t\t<\/li>\n<\/ul>\n<\/ul>\n<\/div>\n<div class='toc-end'>&nbsp;<\/div><\/p>\n<span id=\"Installing_IPv6\"><h1>Installing IPv6<\/h1><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"bash codecolorer\">tce-load <span class=\"re5\">-wi<\/span> ipv6-2.6.33.3-l1-rt19<br \/>\ntce-load <span class=\"re5\">-wi<\/span> ipv6-2.6.33.3-tinycore<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Installing_bind9\"><h1>Installing bind9<\/h1><\/span>\n<span id=\"Prepare_the_system\"><h2>Prepare the system<\/h2><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> addgroup <span class=\"re5\">-g<\/span> <span class=\"nu0\">53<\/span> <span class=\"re5\">-S<\/span> <span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">sudo<\/span> adduser <span class=\"re5\">-h<\/span> <span class=\"sy0\">\/<\/span> <span class=\"re5\">-g<\/span> <span class=\"st0\">&quot;bind9 daemon&quot;<\/span> <span class=\"re5\">-s<\/span> <span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span><span class=\"kw2\">false<\/span> <span class=\"re5\">-G<\/span> <span class=\"kw3\">bind<\/span> <span class=\"re5\">-S<\/span> <span class=\"re5\">-D<\/span> <span class=\"re5\">-H<\/span> <span class=\"re5\">-u<\/span> <span class=\"nu0\">53<\/span> <span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">mkdir<\/span> <span class=\"re5\">-p<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bind<span class=\"sy0\">\/<\/span>slave<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chgrp<\/span> <span class=\"kw3\">bind<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bind<span class=\"sy0\">\/<\/span>slave<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chmod<\/span> <span class=\"nu0\">770<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bind<span class=\"sy0\">\/<\/span>slave<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<ol>\n<li>Create a system group &#8220;bind&#8221; with the GID of 53<\/li>\n<li>This will create a system-user (-S) with his home in \/, a shell of \/bin\/false, without a password (-D), without creating the homedir (-H) and a UID or 53.<\/li>\n<li>Create our config directory for bind9 and a bind-user writable directory for the slave-zone-files.<\/li>\n<li>Change the group of the directory to bind<\/li>\n<li>Allow bind to write<\/li>\n<\/ol>\n<span id=\"Searching_for_bind9\"><h2>Searching for bind9<\/h2><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>ab <span class=\"kw3\">bind<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Installing_bind\"><h2>Installing bind<\/h2><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\">tce-load <span class=\"re5\">-wi<\/span> <span class=\"kw3\">bind<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Create_usrlocaletcbindnamed.conf\"><h2>Create \/usr\/local\/etc\/bind\/named.conf<\/h2><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">mkdir<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">vi<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>named.conf<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>So here we go with the different sections of a named.conf file:<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ This is the primary configuration file for the BIND DNS server named.<\/span><br \/>\n<span class=\"co1\">\/\/ &nbsp; &nbsp;created 20110705 by fsormok_at_thebc.ch<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Set_ACL_for_zone-transfer\"><h3>Set ACL for zone-transfer<\/h3><\/span>\n<p>First we are creating some ACL (Access Control List) which defines which servers are allowed to make a &#8220;zone-transfer&#8221;.<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"c codecolorer\">acl <span class=\"st0\">&quot;trusted-nameservers&quot;<\/span> &nbsp; &nbsp; &nbsp; <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; localhost<span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ my localhost<\/span><br \/>\n&nbsp; &nbsp; 194.209.24.210<span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ ns1.thebc.ch<\/span><br \/>\n&nbsp; &nbsp; 194.209.131.125<span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ ns1.downlevel.net<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Setting_options\"><h3>Setting options{}<\/h3><\/span>\n<p>Now to the options. There are many of them&#8230;<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/><\/div><\/td><td><div class=\"c codecolorer\">options <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"st0\">&quot;\/usr\/local\/etc\/bind&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; pid<span class=\"sy0\">-<\/span>file &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"st0\">&quot;\/var\/run\/named.pid&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; session<span class=\"sy0\">-<\/span>keyfile &nbsp; &nbsp; &nbsp;<span class=\"st0\">&quot;\/var\/run\/session.key&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; auth<span class=\"sy0\">-<\/span>nxdomain &nbsp; &nbsp; &nbsp; &nbsp;no<span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ conform to RFC1035<\/span><br \/>\n&nbsp; &nbsp; listen<span class=\"sy0\">-<\/span>on<span class=\"sy0\">-<\/span>v6 &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"br0\">&#123;<\/span> any<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ enable IPv6 support<\/span><br \/>\n&nbsp; &nbsp; version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"st0\">&quot;Not disclosed&quot;<\/span><span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ hide bind version 9.8.0<\/span><br \/>\n&nbsp; &nbsp; notify &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yes<span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ inform slaves of updates<\/span><br \/>\n&nbsp; &nbsp; allow<span class=\"sy0\">-<\/span>transfer &nbsp; &nbsp; &nbsp; <span class=\"br0\">&#123;<\/span> trusted<span class=\"sy0\">-<\/span>nameservers<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> &nbsp; <span class=\"co1\">\/\/ allow servers to make zonetransfer<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<ol>\n<li>This defines the &#8220;base&#8221; directory. In our installation it doesn&#8217;t really matter, because we are using absolute path when ever possible.<\/li>\n<li>Defines the location of the PID file<\/li>\n<li>The location of the Session-Keyfile<\/li>\n<li>auth-nx-domain ??? have to research&#8230;.<\/li>\n<li>Enable IPv6<\/li>\n<li>Hides the version information if you are queering <code class=\"codecolorer bash default\"><span class=\"bash\"><span class=\"kw2\">dig<\/span> <span class=\"sy0\">@<\/span>localhost version.bind chaos txt<\/span><\/code> or <code class=\"codecolorer bash default\"><span class=\"bash\"><span class=\"kw2\">dig<\/span> <span class=\"sy0\">@<\/span>localhost version.bind any ch<\/span><\/code><\/li>\n<li>Notifies the slaves if they have to update they&#8217;re zones<\/li>\n<li>Allow servers to &#8220;zone-transfer&#8221; only, if they are defined within the ACL &#8220;trusted-nameservers&#8221;<\/li>\n<\/ol>\n<p>Some other interesting option-parameters you might want to use are:<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"c codecolorer\">query<span class=\"sy0\">-<\/span>source<span class=\"sy0\">-<\/span>v6 address &nbsp;port<br \/>\n<span class=\"sy0\">;<\/span><br \/>\nnotify<span class=\"sy0\">-<\/span>source<span class=\"sy0\">-<\/span>v6 &nbsp;<span class=\"br0\">&#91;<\/span>port port<span class=\"br0\">&#93;<\/span><span class=\"sy0\">;<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>query <span class=\"br0\">&#123;<\/span> trusted<span class=\"sy0\">-<\/span>clients<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"c codecolorer\">forward first<span class=\"sy0\">;<\/span><br \/>\nforwarders <span class=\"br0\">&#123;<\/span> 0.0.0.0<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"c codecolorer\">recoursion no<span class=\"sy0\">;<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>recursion <span class=\"br0\">&#123;<\/span> recurseallow<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>recursion <span class=\"br0\">&#123;<\/span> ip.<span class=\"me1\">address<\/span>.<span class=\"me1\">range<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">26<\/span><span class=\"sy0\">;<\/span> 172.20.20.0<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span><span class=\"sy0\">;<\/span> ip.<span class=\"me1\">address<\/span><span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Define_the_DNS-root-servers\"><h3>Define the DNS-root-servers<\/h3><\/span>\n<p>First of all we need to know where the dns-root-servers stay.<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">wget<\/span> ftp:<span class=\"sy0\">\/\/<\/span>FTP.INTERNIC.NET<span class=\"sy0\">\/<\/span>domain<span class=\"sy0\">\/<\/span>named.cache<br \/>\n<span class=\"kw2\">mv<\/span> named.cache db.root<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This will get you an up2date list of all the dns-root-server.<br \/>\nYou can also use dig to get the information:<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">dig<\/span> +<span class=\"re2\">bufsize<\/span>=<span class=\"nu0\">1200<\/span> +norec NS . <span class=\"sy0\">@<\/span>a.root-servers.net <span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bind<span class=\"sy0\">\/<\/span>db.root<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Then we configure the root-zone within named.conf<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ prime the server with knowledge of the root servers<\/span><br \/>\nzone <span class=\"st0\">&quot;.&quot;<\/span> &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"br0\">&#123;<\/span> type hint<span class=\"sy0\">;<\/span> &nbsp; &nbsp;file <span class=\"st0\">&quot;\/usr\/local\/etc\/bind\/db.root&quot;<\/span><span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"The_8220special8221_zones_like_loopback_private8230\"><h3>The &#8220;special&#8221; zones (like loopback, private&#8230;)<\/h3><\/span>\n<p>The next section would tell bind9 what to do with questions about the<\/p>\n<ul>\n<li>localhost<\/li>\n<li>reverse localhost<\/li>\n<li>&#8230; etc &#8230;<\/li>\n<\/ul>\n<p>Both with IPv4 and IPv6. But as far as i&#8217;ve seen this isn&#8217;t necessary anymore. This zones get&#8217;s populated by default if you don&#8217;t specify them. <del datetime=\"2012-03-24T21:55:08+00:00\">And if not, who cares? These zones shouldn&#8217;t be published anyway&#8230;<\/del><br \/>\nThe reason for populating this zones on your local nameserver is to reduce tension on the root-servers. If your local clients try to resolve some private addresses and your nameserver isn&#8217;t able to properly resolve them, he will forward these queries to an upstream (probably root) dnsserver. Of course the root-server isn&#8217;t able to answer the queries correctly, but this generates unnecessary load and trust me, these servers have already enough to do \ud83d\ude42<br \/>\nSo here is just the listing for references. <del datetime=\"2012-03-24T21:55:08+00:00\">Please leave a comment if i&#8217;m completely wrong.<\/del><\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ be authoritative for the localhost forward and reverse zones, and for<\/span><br \/>\n<span class=\"co1\">\/\/ broadcast zones as per RFC 1912<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;localhost&quot; &nbsp;&nbsp; &nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.local&quot;; &nbsp; &nbsp;};<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;127.in-addr.arpa&quot; &nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.127&quot;; &nbsp;};<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;0.in-addr.arpa&quot; &nbsp; &nbsp; &nbsp; &nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.0&quot;; &nbsp; &nbsp;};<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;255.in-addr.arpa&quot; &nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.255&quot;; &nbsp;};<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ be authoritative for the 1918 zones as per RFC 1918<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;10.in-addr.arpa&quot; &nbsp; &nbsp; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;16.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;17.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;18.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;19.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;20.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;21.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;22.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;23.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;24.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;25.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;26.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;27.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;28.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;29.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;30.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;31.172.in-addr.arpa&quot; &nbsp;&nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><br \/>\n<span class=\"co1\">\/\/zone &quot;168.192.in-addr.arpa&quot; &nbsp; { type master; &nbsp;file &quot;\/usr\/local\/etc\/bind\/db.empty&quot;;&nbsp; &nbsp; };<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>The same goes for the IPv6 zones:<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/><\/div><\/td><td><div class=\"c codecolorer\">0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ No host range<\/span><br \/>\n1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Loopback Address<\/span><br \/>\nC.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Unique Local Unicast<\/span><br \/>\nD.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Unique Local Unicast<\/span><br \/>\n<span class=\"nu0\">8<\/span>.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Link Local Unicast<\/span><br \/>\n<span class=\"nu0\">9<\/span>.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Link Local Unicast<\/span><br \/>\nA.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Link Local Unicast<\/span><br \/>\nB.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Link Local Unicast<\/span><br \/>\nC.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Site Local Unicast<\/span><br \/>\nD.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Site Local Unicast<\/span><br \/>\nE.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Site Local Unicast<\/span><br \/>\nF.<span class=\"me1\">E<\/span>.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Site Local Unicast<\/span><br \/>\nF.<span class=\"me1\">F<\/span>.<span class=\"me1\">IP6<\/span>.<span class=\"me1\">ARPA<\/span> &nbsp;<span class=\"co1\">\/\/ Multicast<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>And the CHAOS stuff&#8230;<\/p>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"c codecolorer\">version.<span class=\"me1\">bind<\/span><br \/>\nhostname.<span class=\"me1\">bind<\/span><br \/>\nauthors.<span class=\"me1\">bind<\/span><br \/>\nid.<span class=\"me1\">server<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Now for the important part. The part because we are setting up a name server actually&#8230;<\/p>\n<span id=\"IPv4_reverse_lookup_zone\"><h3>IPv4 reverse lookup zone<\/h3><\/span>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ ********** IPv4 - REVERSELOOKUP - ZONE **********<\/span><br \/>\nzone <span class=\"st0\">&quot;24.209.194.in-addr.arpa&quot;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\ntype master<span class=\"sy0\">;<\/span><br \/>\nfile <span class=\"st0\">&quot;\/usr\/local\/etc\/bind\/24.209.194.zone&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"IPv6_reverse_lookup_zone\"><h3>IPv6 reverse lookup zone<\/h3><\/span>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ ********** IPv6 - REVERSELOOKUP - ZONE **********<\/span><br \/>\n<span class=\"co1\">\/\/ Reverse for 2001:470:26:6f7::\/64<\/span><br \/>\nzone <span class=\"st0\">&quot;7.f.6.0.6.2.0.0.0.7.4.0.1.0.0.2.ip6.arpa&quot;<\/span> IN <span class=\"br0\">&#123;<\/span><br \/>\ntype master<span class=\"sy0\">;<\/span><br \/>\nfile <span class=\"st0\">&quot;\/usr\/local\/etc\/bind\/2001:470:26:6f7.zone&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"IPv4IPv6_forward_lookup_zone\"><h3>IPv4\/IPv6 (forward) lookup zone<\/h3><\/span>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ ***********************************************************<\/span><br \/>\n<span class=\"co1\">\/\/ *<\/span><br \/>\n<span class=\"co1\">\/\/ * &nbsp;P R I M A R Y &nbsp;- &nbsp;D O M A I N S<\/span><br \/>\n<span class=\"co1\">\/\/ *<\/span><br \/>\n<span class=\"co1\">\/\/ ***********************************************************<\/span><br \/>\nzone <span class=\"st0\">&quot;thebc.ch&quot;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\ntype master<span class=\"sy0\">;<\/span><br \/>\nfile <span class=\"st0\">&quot;\/usr\/local\/etc\/bind\/zone_thebc.ch&quot;<\/span><span class=\"sy0\">;<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>query &nbsp; &nbsp; <span class=\"br0\">&#123;<\/span> any<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ no restriction on queries<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>update &nbsp; &nbsp;<span class=\"br0\">&#123;<\/span> none<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ don't allow dynamic updates<\/span><br \/>\nallow<span class=\"sy0\">-<\/span>transfer &nbsp;<span class=\"br0\">&#123;<\/span> trusted<span class=\"sy0\">-<\/span>nameservers<span class=\"sy0\">;<\/span> <span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ restrict zone trans<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Create_the_zone_files\"><h2>Create the zone files<\/h2><\/span>\n<span id=\"IPv4_reverse_lookup_zone_1\"><h3>IPv4 reverse lookup zone<\/h3><\/span>\n<span id=\"IPv6_reverse_lookup_zone_1\"><h3>IPv6 reverse lookup zone<\/h3><\/span>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"c codecolorer\">$TTL &nbsp; &nbsp;<span class=\"nu0\">86400<\/span> &nbsp; <span class=\"co1\">\/\/ 1day<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"c codecolorer\">@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;SOA &nbsp; &nbsp; <span class=\"nu0\">7<\/span>.<span class=\"me1\">f<\/span>.6.0.6.2.0.0.0.7.4.0.1.0.0.2.<span class=\"me1\">ip6<\/span>.<span class=\"me1\">arpa<\/span>. <span class=\"me1\">sysop<\/span>.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>. <span class=\"br0\">&#40;<\/span><br \/>\n<span class=\"nu0\">10004<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ serial<\/span><br \/>\n<span class=\"nu0\">3600<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ refresh<\/span><br \/>\n<span class=\"nu0\">900<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ retry<\/span><br \/>\n<span class=\"nu0\">3600000<\/span> &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"co1\">\/\/ expiry<\/span><br \/>\n<span class=\"nu0\">3600<\/span> <span class=\"br0\">&#41;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ minimum<\/span><br \/>\nIN &nbsp; &nbsp; &nbsp;NS &nbsp; &nbsp; &nbsp;ns1.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>.<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"c codecolorer\"><span class=\"co1\">\/\/ 2001:470:26:6f7:20c:29ff:fe08:d1aa<\/span><br \/>\na.<span class=\"me1\">a<\/span>.1.<span class=\"me1\">d<\/span>.8.0.<span class=\"me1\">e<\/span>.<span class=\"me1\">f<\/span>.<span class=\"me1\">f<\/span>.<span class=\"me1\">f<\/span>.9.2.<span class=\"me1\">c<\/span>.0.2.0 &nbsp; &nbsp; IN PTR&nbsp; mail.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>.<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"IPv4IPv6_forward_zone\"><h3>IPv4\/IPv6 (forward) zone<\/h3><\/span>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/><\/div><\/td><td><div class=\"c codecolorer\">$TTL <span class=\"nu0\">86400<\/span><br \/>\n<span class=\"sy0\">;<\/span> Information <span class=\"kw1\">for<\/span> the <span class=\"st0\">&quot;forward&quot;<\/span> domain thebc.<span class=\"me1\">ch<\/span>.<br \/>\n@ &nbsp; &nbsp; &nbsp; IN SOA ns1.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"me1\">sysop<\/span>.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>. &nbsp;<span class=\"br0\">&#40;<\/span><br \/>\n<span class=\"nu0\">2010012629<\/span> &nbsp; &nbsp; &nbsp;<span class=\"sy0\">;<\/span> Serial number<br \/>\n<span class=\"nu0\">43200<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">;<\/span> Refresh timer <span class=\"sy0\">-<\/span> <span class=\"nu0\">12<\/span> hours<br \/>\n<span class=\"nu0\">3600<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">;<\/span> Retry timer <span class=\"sy0\">-<\/span> <span class=\"nu0\">1<\/span> hour<br \/>\n<span class=\"nu0\">7200<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">;<\/span> Expire timer <span class=\"sy0\">-<\/span> <span class=\"nu0\">2<\/span> hour<br \/>\n<span class=\"nu0\">86400<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">;<\/span> Minimum timer <span class=\"sy0\">-<\/span> <span class=\"nu0\">1<\/span> day<br \/>\n<span class=\"br0\">&#41;<\/span><br \/>\nIN &nbsp; &nbsp; &nbsp;NS &nbsp; &nbsp; &nbsp;ns1.<span class=\"me1\">nx<\/span>.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">;<\/span> primary<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"c codecolorer\">&nbsp;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<div class=\"codecolorer-container c default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"c codecolorer\">ns1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; AAAA &nbsp; &nbsp;<span class=\"nu0\">2001<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">470<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">26<\/span><span class=\"sy0\">:<\/span>6f7<span class=\"sy0\">:<\/span>20c<span class=\"sy0\">:<\/span>29ff<span class=\"sy0\">:<\/span>fe08<span class=\"sy0\">:<\/span>d1aa &nbsp; <span class=\"sy0\">;<\/span> primary<br \/>\nfw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IN &nbsp; &nbsp; &nbsp;AAAA &nbsp; &nbsp;<span class=\"nu0\">2001<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">470<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">26<\/span><span class=\"sy0\">:<\/span>6f7<span class=\"sy0\">::<\/span><span class=\"nu0\">1<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">;<\/span> firewall<br \/>\nwww &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; AAAA &nbsp; &nbsp;<span class=\"nu0\">2001<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">470<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">26<\/span><span class=\"sy0\">:<\/span>6f7<span class=\"sy0\">:<\/span>20c<span class=\"sy0\">:<\/span>29ff<span class=\"sy0\">:<\/span>fe08<span class=\"sy0\">:<\/span>d1aa &nbsp; <span class=\"sy0\">;<\/span> web<span class=\"sy0\">-<\/span>server<br \/>\nmail &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IN &nbsp; &nbsp; &nbsp;AAAA &nbsp; &nbsp;<span class=\"nu0\">2001<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">470<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">26<\/span><span class=\"sy0\">:<\/span>6f7<span class=\"sy0\">:<\/span>20c<span class=\"sy0\">:<\/span>29ff<span class=\"sy0\">:<\/span>fe08<span class=\"sy0\">:<\/span>d1aa &nbsp; <span class=\"sy0\">;<\/span> web<span class=\"sy0\">-<\/span>server<br \/>\nnx.<span class=\"me1\">thebc<\/span>.<span class=\"me1\">ch<\/span>. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"me1\">IN<\/span> &nbsp; &nbsp; &nbsp;MX <span class=\"nu0\">5<\/span> &nbsp; &nbsp;mail<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Create_start-script\"><h2>Create start-script<\/h2><\/span>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/>33<br \/>34<br \/>35<br \/>36<br \/>37<br \/>38<br \/>39<br \/>40<br \/>41<br \/>42<br \/>43<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/sh<\/span><br \/>\n<span class=\"co0\"># bind9 is a Domain Name Server (DNS)<\/span><br \/>\n<br \/>\n<span class=\"re2\">PATH<\/span>=<span class=\"sy0\">\/<\/span>sbin:<span class=\"sy0\">\/<\/span>bin:<span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>sbin:<span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<br \/>\n<br \/>\n<span class=\"co0\"># for a chrooted server: &quot;-u bind -t \/var\/lib\/named&quot;<\/span><br \/>\n<span class=\"co0\">#test -x \/usr\/sbin\/rndc || exit 0<\/span><br \/>\n<br \/>\n<span class=\"re2\">PIDFILE<\/span>=<span class=\"sy0\">\/<\/span>var<span class=\"sy0\">\/<\/span>run<span class=\"sy0\">\/<\/span>named.pid<br \/>\n<br \/>\n<span class=\"kw1\">case<\/span> <span class=\"st0\">&quot;$1&quot;<\/span> <span class=\"kw1\">in<\/span><br \/>\nstart<span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Starting domain name service...&quot;<\/span> <span class=\"st0\">&quot;bind9&quot;<\/span><br \/>\n<br \/>\n<span class=\"kw2\">mkdir<\/span> <span class=\"re5\">-p<\/span> <span class=\"sy0\">\/<\/span>var<span class=\"sy0\">\/<\/span>log<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">chmod<\/span> <span class=\"nu0\">775<\/span> <span class=\"sy0\">\/<\/span>var<span class=\"sy0\">\/<\/span>log<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span><br \/>\n<span class=\"kw2\">chown<\/span> root:bind <span class=\"sy0\">\/<\/span>var<span class=\"sy0\">\/<\/span>log<span class=\"sy0\">\/<\/span><span class=\"kw3\">bind<\/span> <span class=\"sy0\">&amp;<\/span>gt;<span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null <span class=\"nu0\">2<\/span><span class=\"sy0\">&amp;<\/span>gt;<span class=\"sy0\">&amp;<\/span>amp;<span class=\"nu0\">1<\/span> <span class=\"sy0\">||<\/span> <span class=\"kw2\">true<\/span><br \/>\n<br \/>\n<span class=\"co0\"># start the server<\/span><br \/>\n<span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>sbin<span class=\"sy0\">\/<\/span>named <span class=\"re5\">-c<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bind<span class=\"sy0\">\/<\/span>named.conf <span class=\"re5\">-u<\/span> <span class=\"kw3\">bind<\/span><br \/>\n<span class=\"sy0\">;;<\/span><br \/>\nstop<span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Stopping domain name service...&quot;<\/span> <span class=\"st0\">&quot;bind9&quot;<\/span><br \/>\n<br \/>\n<span class=\"re2\">pid<\/span>=$<span class=\"br0\">&#40;<\/span><span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span><span class=\"kw2\">cat<\/span> <span class=\"co1\">${PIDFILE}<\/span><span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"re5\">-n<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$pid<\/span>&quot;<\/span> <span class=\"br0\">&#93;<\/span>; <span class=\"kw1\">then<\/span><br \/>\n<span class=\"kw1\">while<\/span> <span class=\"kw2\">kill<\/span> <span class=\"re1\">$pid<\/span> <span class=\"nu0\">2<\/span><span class=\"sy0\">&amp;<\/span>gt;<span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null; <span class=\"kw1\">do<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;waiting for pid <span class=\"es2\">$pid<\/span> to die&quot;<\/span><br \/>\n<span class=\"kw2\">sleep<\/span> <span class=\"nu0\">1<\/span><br \/>\n<span class=\"kw1\">done<\/span><br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Stoped!&quot;<\/span> <span class=\"re4\">$?<\/span><br \/>\n<span class=\"sy0\">;;<\/span><br \/>\nrestart<span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"re4\">$0<\/span> stop<br \/>\n<span class=\"re4\">$0<\/span> start<br \/>\n<span class=\"sy0\">;;<\/span><br \/>\n<span class=\"sy0\">*<\/span><span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;Usage: \/etc\/init.d\/bind9 {start|stop|restart}&quot;<\/span><br \/>\n<span class=\"kw3\">exit<\/span> <span class=\"nu0\">1<\/span><br \/>\n<span class=\"sy0\">;;<\/span><br \/>\n<span class=\"kw1\">esac<\/span><br \/>\n<span class=\"kw3\">exit<\/span> <span class=\"nu0\">0<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Save_configuration\"><h2>Save configuration<\/h2><\/span>\n<p>To save the configuration and make all the scripts and files available after a reboot do the following (tinycore way):<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;etc\/passwd&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>opt<span class=\"sy0\">\/<\/span>.filetool.lst<br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;etc\/group&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>opt<span class=\"sy0\">\/<\/span>.filetool.lst<br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;etc\/shadow&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>opt<span class=\"sy0\">\/<\/span>.filetool.lst<br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;usr\/local\/etc\/bind&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>opt<span class=\"sy0\">\/<\/span>.filetool.lst<br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;etc\/init.d\/bind9&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>opt<span class=\"sy0\">\/<\/span>.filetool.lst<br \/>\nfiletool.sh <span class=\"re5\">-b<\/span> <span class=\"re5\">-p<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<span id=\"Additional_stuff\"><h1>Additional stuff<\/h1><\/span>\n<span id=\"Remote_Name_Daemon_Control\"><h2>Remote Name Daemon Control<\/h2><\/span>\n<p>The remote name daemon control (rndc) program allows the system administrator to control the operation of a name server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing IPv6 12tce-load -wi ipv6-2.6.33.3-l1-rt19 tce-load -wi ipv6-2.6.33.3-tinycore Installing bind9 Prepare the system 12345sudo addgroup -g 53 -S bind sudo adduser -h \/ -g &quot;bind9 daemon&quot; -s \/bin\/false -G bind -S -D -H -u 53 bind sudo mkdir -p \/usr\/local\/etc\/bind &hellip; <a href=\"https:\/\/thebc.ch\/blog\/?p=970\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,33],"tags":[],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-linux","category-tinycore"],"_links":{"self":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=970"}],"version-history":[{"count":105,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":6258,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions\/6258"}],"wp:attachment":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}