User Tools

Site Tools


jessie_bind_chroot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
jessie_bind_chroot [2016/01/11 09:11] – [Long story short:] adminjessie_bind_chroot [2016/01/25 08:33] (current) – [Long story short:] admin
Line 38: Line 38:
 mknod /var/bind9/chroot/dev/random c 1 8 mknod /var/bind9/chroot/dev/random c 1 8
 chmod 660 /var/bind9/chroot/dev/{null,random} chmod 660 /var/bind9/chroot/dev/{null,random}
 +chown bind /var/bind9/chroot/dev/random
 </code> </code>
 Move the current config directory into the new chroot directory: Move the current config directory into the new chroot directory:
Line 69: Line 70:
 /etc/init.d/rsyslog restart; /etc/init.d/bind9 start /etc/init.d/rsyslog restart; /etc/init.d/bind9 start
 </code> </code>
-A good idea too+ 
 +====Logging==== 
 + 
 +/etc/logrotate.d/named
 <code> <code>
-chown bind /var/bind9/chroot/dev/random+/var/bind9/chroot/var/log/bind.log { 
 +        daily 
 +        compress 
 +        delaycompress 
 +        rotate 5 
 +        missingok 
 +        postrotate 
 +                [ -e /etc/init.d/bind9 ] && /etc/init.d/bind9 reload > /dev/null 2>&1 || true 
 +        endscript 
 +
 + 
 +/var/bind9/chroot/var/log/security_info.log { 
 +        daily 
 +        compress 
 +        delaycompress 
 +        rotate 5 
 +        missingok 
 +        postrotate 
 +                [ -e /etc/init.d/bind9 ] && /etc/init.d/bind9 reload > /dev/null 2>&1 || true 
 +        endscript 
 +
 + 
 +/var/bind9/chroot/var/log/update_debug.log { 
 +        daily 
 +        compress 
 +        delaycompress 
 +        rotate 5 
 +        missingok 
 +        postrotate 
 +                [ -e /etc/init.d/bind9 ] && /etc/init.d/bind9 reload > /dev/null 2>&1 || true 
 +        endscript 
 +
 </code> </code>
  
Line 87: Line 123:
 mknod /var/bind9/chroot/dev/random c 1 8 mknod /var/bind9/chroot/dev/random c 1 8
 chmod 660 /var/bind9/chroot/dev/{null,random} chmod 660 /var/bind9/chroot/dev/{null,random}
 +chown bind /var/bind9/chroot/dev/random
 mv /etc/bind /var/bind9/chroot/etc mv /etc/bind /var/bind9/chroot/etc
 ln -s /var/bind9/chroot/etc/bind /etc/bind  ln -s /var/bind9/chroot/etc/bind /etc/bind 
Line 95: Line 132:
 chgrp bind /var/bind9/chroot/var/{cache/bind,run/named} chgrp bind /var/bind9/chroot/var/{cache/bind,run/named}
 chown bind /var/bind9/chroot/dev/random chown bind /var/bind9/chroot/dev/random
 +touch /var/bind9/chroot/var/log/{bind.log,update_debug.log,security_info.log}
 +ln -s /var/bind9/chroot/var/log/ /var/log/bind
 +chgrp bind /var/bind9/chroot/var/log/*.log
 vi /etc/init.d/bind9 vi /etc/init.d/bind9
  
Line 103: Line 143:
 </code> </code>
  
- +  * Add the logrotate script from above
jessie_bind_chroot.1452503517.txt.gz · Last modified: 2016/01/11 09:11 by admin