{"id":667,"date":"2012-01-15T03:49:53","date_gmt":"2012-01-15T11:49:53","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=667"},"modified":"2012-01-15T03:49:53","modified_gmt":"2012-01-15T11:49:53","slug":"intranet-setup-djbdns-to-respond-for-local-to-help-development","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2012\/01\/15\/intranet-setup-djbdns-to-respond-for-local-to-help-development\/","title":{"rendered":"Intranet: setup DJBDNS to respond for *.local to help development"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>0. Follow instructions to setup a DNS Cache<\/p>\n<p>&nbsp;<\/p>\n<p>1. Create an alias for eth0:<\/p>\n<p># nano \/etc\/network\/interfaces<\/p>\n<pre>auto eth0:0\niface eth0:0 inet static\n       address 10.0.0.251\n       netmask 255.255.255.0\n       network 10.0.0.0\n       broadcast 10.0.0.255\n       gateway 10.0.0.254<\/pre>\n<p>2 . restart networking<\/p>\n<p># \/etc\/init.d\/networking restart<\/p>\n<p>&nbsp;<\/p>\n<p>3. Use tinydns-conf to setup djbdns&nbsp;<\/p>\n<p># tinydns-conf dnscache dnslog \/etc\/tinydns 10.0.0.251<\/p>\n<p>&nbsp;<\/p>\n<p># ln -svf \/etc\/tinydns \/etc\/service<\/p>\n<p># cd \/etc\/service\/tinydns\/root\/<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>4. Setup the &quot;local&quot; domain name:<\/p>\n<p># .\/add-ns local 10.0.0.251<\/p>\n<p>#.\/add-host a.ns.local 10.0.0.251<\/p>\n<p>&nbsp;<\/p>\n<p>5. Create the data file for tinydns<\/p>\n<p># cd \/etc\/service\/tinydns\/root\/<\/p>\n<p># nano data<\/p>\n<p>&nbsp;<\/p>\n<p>.local:10.0.0.251:a:259200<br \/>\n\t=a.ns.local:10.0.0.251:86400<br \/>\n\t+*.local:10.0.0.250:86400<\/p>\n<div>&nbsp;<\/div>\n<div>In the sample file above:<\/div>\n<div>&#8211; 10.0.0.251 is the IP address of the DNS server, so it is the one responsibe for domain name responses<\/div>\n<div>&#8211; 10.0.0.250 is the IP address of your future Web server<\/div>\n<div>&nbsp;<\/div>\n<div>Save and update data\/cdb<\/div>\n<div># make<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>6. Edit \/etc\/resolv.conf<\/div>\n<div>\n<div>\n<div>search portnumber53.local<\/div>\n<div>nameserver 10.0.0.251<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/p><\/div>\n<\/div>\n<p>7. Let dnscache know about your *.local domain names:<\/p>\n<p># cd \/etc\/service\/dnscache<\/p>\n<p># echo 10.0.0.251 &gt; root\/servers\/local<\/p>\n<p># chmod 644 root\/servers\/local<\/p>\n<p>&nbsp;<\/p>\n<p>8. Restart dnscache<\/p>\n<p># svc -t .<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 0. Follow instructions to setup a DNS Cache &nbsp; 1. Create an alias for eth0: # nano \/etc\/network\/interfaces auto eth0:0 iface eth0:0 inet static address 10.0.0.251 netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255 gateway 10.0.0.254 2 . restart networking # \/etc\/init.d\/networking restart &nbsp; 3. Use tinydns-conf to setup djbdns&nbsp; #&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2012\/01\/15\/intranet-setup-djbdns-to-respond-for-local-to-help-development\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[107,111,118,222],"class_list":["post-667","post","type-post","status-publish","format-standard","hentry","category-tutorial-2","tag-development","tag-djbdns","tag-domains","tag-local"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=667"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/667\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}