LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bind 9 - Chroot problems (http://www.linuxquestions.org/questions/linux-networking-3/bind-9-chroot-problems-111028/)

Nauseous 11-01-2003 01:48 AM

Bind 9 - Chroot problems
 
Hey all.

Just trying to compile bind 9.2.3 on a redhat 9 box. I have followed the tutorial given on this page

http://www.unixwiz.net/techtips/bind9-chroot.html
This was the first error recieved, which i fixed by running bind with the -c switch.

Nov 1 17:10:59 server named[10180]: starting BIND 9.2.3
Nov 1 17:10:59 server named[10180]: using 1 CPU
Nov 1 17:10:59 server named[10180]: loading configuration from '/usr/local/etc/named.conf'
Nov 1 17:10:59 server named[10180]: none:0: open: /usr/local/etc/named.conf: file not found
Nov 1 17:10:59 server named[10180]: loading configuration: file not found
Nov 1 17:10:59 server named[10180]: exiting (due to fatal error)


This is the error below that i am now recieving. Any help would be appreciated.

Nov 1 17:33:57 server named[1261]: loading configuration from '/etc/named.conf'
Nov 1 17:33:57 server named[1261]: listening on IPv4 interface lo, 127.0.0.1#53
Nov 1 17:33:57 server named[1261]: listening on IPv4 interface eth0, 192.168.0.1#53
Nov 1 17:33:57 server named[1261]: none:0: open: /usr/local/etc/rndc.key: file not found
Nov 1 17:33:57 server named[1261]: couldn't add command channel 127.0.0.1#953: file not found
Nov 1 17:33:58 server named[1261]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Nov 1 17:33:58 server named[1261]: zone localhost/IN: loaded serial 42
Nov 1 17:33:58 server named[1261]: running

markus1982 11-01-2003 02:55 AM

Well in the chroot directory recreate the directory structure and put the files in there ... also run bind non chrooted and make use of the lsof command to see which data files and libraries it depends on.

chort 11-01-2003 04:51 AM

You need to copy rndc.key to the etc directory where BIND is being chrooted. Once it chroots it cannot read files outside it's own root, so you have to make sure there's a local copy with the correct path.

Example:
named will be chroot'd to /var/named
using the above config files (/usr/local/etc/rndc.key)
you would need to put it here:
/var/named/usr/local/etc/rndc.key
same with named.conf


All times are GMT -5. The time now is 07:33 PM.