Enhanced DNS Security: BIND can be run under Chroot

Source: Internet
Author: User
Article Title: enhanced DNS Security: BIND can be run under Chroot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Running BIND on chroot improves security. This article has been tested on Debian Sarge. You can modify other versions as needed.
  
If you have not installed BIND, run the following command to install Bind 9.
  
Code:
  
Apt-get install bind9
  
Stop the Bind service before modifying the Configuration:
  
Code:
  
/Etc/init. d/bind9 stop
  
Open the configuration file:
  
Code:
  
Nano-w/etc/default/bind9
  
Change the content:
  
Code:
  
OPTIONS = "-u bind-t/var/lib/named"
  
Create related directories:
  
Code:
  
Mkdir-p/var/lib/named/etc
  
Mkdir/var/lib/named/dev
  
Mkdir-p/var/lib/named/var/cache/bind
  
Mkdir-p/var/lib/named/var/run/bind/run
  
Mobile configuration directory:
  
Code:
  
Mv/etc/bind/var/lib/named/etc
  
Create a link to Upgrade Bind later:
  
Code:
  
Ln-s/var/lib/named/etc/bind
  
Create a null and random Device and Set directory ownership:
  
Code:
  
Mknod/var/lib/named/dev/null c 1 3
  
Mknod/var/lib/named/dev/random c 1 8
  
Chmod 666/var/lib/named/dev/null/var/lib/named/dev/random
  
Chown-R bind: bind/var/lib/named/var /*
  
Chown-R bind: bind/var/lib/named/etc/bind
  
Then we need to modify the syslog configuration to get the log file accurately.
  
Code:
  
Nano-w/etc/init. d/sysklogd
  
Find SYSLOGD = and change it to SYSLOGD = "-a/var/lib/named/dev/log ".
  
Restart syslog daemon:
  
Code:
  
/Etc/init. d/sysklogd restart
  
Start Bind:
  
Code:
  
/Etc/init. d/bind9 start
  
Then you can view error logs through tail/var/log/syslog.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.