![]() |
Ubuntu Hardy chrooted bind9 fails to start > FIXED
Preparing to move my server to LTS Ubuntu Hardy, just testing using vmware
I've found a weird issue while chrooting bind. ( following The Perfect Server Setup ) So I guess this will popup sooner or later anyway... What I did so far -all as root-: Code:
apt-get install bind9Code:
vim /etc/default/bind9creating null & random devices fixing permissions Code:
mkdir -p /var/lib/named/etcCode:
vim /etc/default/syslogdif I try to start > /etc/bind9 start it simply fails stopping it > Code:
rndc: connect failed: 127.0.0.1#953: connection refusedCode:
Mar 25 08:06:57 hardy-server named[11824]: starting BIND 9.4.2 -u bind -t /var/lib/namedthx.. |
As you can see from the error messages this is a permissions issue the config file can not be read by named.
|
Come to think of it looking at the last line it could be apparmor that is blocking access to the file.
|
:eek:
Woohoo cool that was it, after purging this package it worked, obviously this is not the way to do this, but now I know for certain... apparmor is something new on ubuntu, wasn't aware of it... I'll take a look in the Suse community for a decent manual thank you, |
Fixed
here's the fix, don't know if it makes much sense to chroot and use apparmor at the same time.. guess there's no harm either...
follow above described procedure & end with Code:
vim /etc/apparmor.d/usr.sbin.namedCode:
# vim:syntax=apparmorCode:
/etc/init.d/sysklogd restart |
I wonder why they would ship a policy that does not work. Am not sure if it will work in the chroot, as most MAC systems use the real file path test if you can and let us know.
|
Quote:
I used a symbolic link for all libraries that have path's hard coded ( if I understand you correct ), Bind seems to behave properly so until now all is well. I still don't know if there's a point in using chrooting & apparmor at the same time, as it might as well weaken security instead of additional hardening... If someone knows of a deprecated package with known weaknesses I might be able to test those in this kind of environment ( why aren't there 48h days ). But before that I have to solve another issue with compiling the ISPconfig package, as it's complaining about wrong syntaxes in an empty httpd.conf :rolleyes: ... |
Still some problems
Thanks for the help on apparmor. I have noticed that bind will still not access the random device and apparmor seems to go out of the chroot jail and take the old one so I have just added two lines at the end to
/etc/apparmor.d/usr.bin.named Code:
[...] |
K thx, didn't notice yet ( stopped working on it ), pretty busy debugging a bogus driver..
I'll add it to the howto... |
I just ran into this problem as well after upgrading to 8.04LTS also and this fixed it perfectly!
Thanks for the info guys! |
| All times are GMT +2. The time now is 12:29. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.