{"id":379,"date":"2014-09-14T11:30:15","date_gmt":"2014-09-14T10:30:15","guid":{"rendered":"http:\/\/www.xtreem.se\/?p=379"},"modified":"2014-09-14T12:59:00","modified_gmt":"2014-09-14T11:59:00","slug":"install-bind9named-and-chroot-it-on-debian-7-6","status":"publish","type":"post","link":"http:\/\/www.xtreem.se\/?p=379","title":{"rendered":"Install and chroot bind9 on debian 7.6"},"content":{"rendered":"<p><strong>Installation<\/strong><\/p>\n<p><em>Start with installing bind9.<br \/>\n<\/em><code><br \/>\napt-get install bind9<br \/>\n<\/code><\/p>\n<p><em>Stop bind and prepare to chroot it.<\/em><br \/>\n<code><br \/>\n\/etc\/init.d\/bind9 stop<br \/>\n<\/code><\/p>\n<p><em>Edit \/etc\/default\/bind9<\/em><br \/>\n<code><br \/>\n# run resolvconf?<br \/>\nRESOLVCONF=no<\/p>\n<p># startup options for the server<br \/>\nOPTIONS=\"-u bind -t \/var\/lib\/named\"<br \/>\n<\/code><\/p>\n<p><em>Create the new directories under \/var\/lib.<br \/>\nMove the bind-files and creating symbolic-links to them.<\/em><br \/>\n<code><br \/>\nmkdir -p \/etc\/bind\/zones<br \/>\nmkdir -p \/var\/lib\/named\/etc<br \/>\nmkdir \/var\/lib\/named\/dev<br \/>\nmkdir -p \/var\/lib\/named\/var\/cache\/bind<br \/>\nmkdir -p \/var\/lib\/named\/var\/run\/bind\/run<br \/>\nmv \/etc\/bind \/var\/lib\/named\/etc<br \/>\nln -s \/var\/lib\/named\/etc\/bind \/etc\/bind<br \/>\n<\/code><\/p>\n<p><em>Make null and random devices and set permissions<br \/>\n<\/em><code><br \/>\nmknod \/var\/lib\/named\/dev\/null c 1 3<br \/>\nmknod \/var\/lib\/named\/dev\/random c 1 8<br \/>\nchmod 666 \/var\/lib\/named\/dev\/null \/var\/lib\/named\/dev\/random<br \/>\nchown -R bind:bind \/var\/lib\/named\/var\/*<br \/>\nchown -R bind:bind \/var\/lib\/named\/etc\/bind<br \/>\n<\/code><\/p>\n<p><em>Make bind able to report to syslog.<br \/>\nCreate and edit \/etc\/rsyslog.d\/bind-chroot.conf<\/em><br \/>\n<code><br \/>\n$AddUnixListenSocket \/var\/lib\/named\/dev\/log<br \/>\n<\/code><\/p>\n<p><em>Restart syslog<\/em><br \/>\n<code><br \/>\n\/etc\/init.d\/rsyslog restart<br \/>\n<\/code><\/p>\n<p><em>Start bind<br \/>\n<\/em><code><br \/>\n\/etc\/init.d\/bind9 start<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installation Start with installing bind9. apt-get install bind9 Stop bind and prepare to chroot it. \/etc\/init.d\/bind9 stop Edit \/etc\/default\/bind9 # run resolvconf? RESOLVCONF=no # startup options for the server OPTIONS=&#8221;-u bind -t \/var\/lib\/named&#8221; Create the new directories under \/var\/lib. Move the bind-files and creating symbolic-links to them. mkdir -p \/etc\/bind\/zones mkdir -p \/var\/lib\/named\/etc mkdir \/var\/lib\/named\/dev [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[30,8,4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/posts\/379"}],"collection":[{"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=379"}],"version-history":[{"count":11,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":393,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=\/wp\/v2\/posts\/379\/revisions\/393"}],"wp:attachment":[{"href":"http:\/\/www.xtreem.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xtreem.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}