LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-17-2007, 03:22 PM   #1
Richard01
LQ Newbie
 
Registered: May 2007
Location: Norwich, UK
Distribution: Suse 10.1
Posts: 3

Rep: Reputation: 0
DHCPD updating BIND on SUSE


hi all, im trying to get dynamic updated to work. i have read other forums and howtos, but still run in to the same problem:

May 17 21:07:27 Server1 named[10588]: client 10.1.2.2#32881: updating zone 'domain/IN': adding an RR at 'computer.domain' A
May 17 21:07:27 Server1 named[10588]: client 10.1.2.2#32881: updating zone 'domain/IN': adding an RR at 'computer.domain' TXT
May 17 21:07:27 Server1 named[10588]: journal file master/domainX.jnl does not exist, creating it
May 17 21:07:27 Server1 named[10588]: master/domainX.jnl: create: permission denied
May 17 21:07:27 Server1 named[10588]: client 10.1.2.2#32881: updating zone 'domain/IN': error: journal open failed: unexpected error
May 17 21:07:27 Server1 dhcpd: Unable to add forward map from computer.domain. to 10.1.2.32: timed out

it looks like a permissions issue, but i have tried
chown -R named named
chgrp -R named named
and
chmod -R 777 named

but I still get the same error in the log.

Any help would be much appreciated.

thanks

Richard.
 
Old 05-17-2007, 06:29 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
That is frequently a problem found in Redhat versions of linux with SElinux enabled. Here is a quote about it:

Quote:
here is the Q and A
*Q:*

I'm running BIND on Red Hat Enterprise Linux or Fedora Core -

Why can't named update slave zone database files?

Why can't named create DDNS journal files or update the master zones
from journals?

Why can't named create custom log files?

*A:*

Red Hat Security Enhanced Linux (SELinux) policy security protections :

Red Hat have adopted the National Security Agency's SELinux security
policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
security , which are more secure than running named in a chroot and make
use of the bind-chroot environment unecessary .

By default, named is not allowed by the SELinux policy to write, create
or delete any files EXCEPT in these directories:

$ROOTDIR/var/named/slaves
$ROOTDIR/var/named/data
$ROOTDIR/var/tmp


where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
installed.

The SELinux policy particularly does NOT allow named to modify the
$ROOTDIR/var/named directory, the default location for master zone
database files.

SELinux policy overrules file access permissions - so even if all the
files under /var/named have ownership named:named and mode rw-rw-r--,
named will still not be able to write or create files except in the
directories above, with SELinux in Enforcing mode.

So, to allow named to update slave or DDNS zone files, it is best to
locate them in $ROOTDIR/var/named/slaves, with named.conf zone
statements such as:

zone "slave.zone." IN {
type slave;
file "slaves/slave.zone.db";
...
};
zone "ddns.zone." IN {
type master;
allow-updates {...};
file "slaves/ddns.zone.db";
};


To allow named to create its cache dump and statistics files, for
example, you could use named.conf options statements such as:

options {
...
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
...
};


You can also tell SELinux to allow named to update any zone database
files, by setting the SELinux tunable boolean parameter
'named_write_master_zones=1', using the system-config-securitylevel GUI,
using the 'setsebool' command, or in /etc/selinux/targeted/booleans.

You can disable SELinux protection for named entirely by setting the
'named_disable_trans=1' SELinux tunable boolean parameter.

The SELinux named policy defines these SELinux contexts for named:

named_zone_t : for zone database files - $ROOTDIR/var/named/*
named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}


If you want to retain use of the SELinux policy for named, and put named
files in different locations, you can do so by changing the context of
the custom file locations .

To create a custom configuration file location, eg. '/root/named.conf',
to use with the 'named -c' option, do:

# chcon system_u:object_r:named_conf_t /root/named.conf


To create a custom modifiable named data location, eg. '/var/log/named'
for a log file, do:

# chcon system_u:object_r:named_cache_t /var/log/named


To create a custom zone file location, eg. /root/zones/, do:

# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
I found that writeup at http://forums.fedoraforum.org/showthread.php?t=119222

You should put your distro in your profile, so we know what you're running. It seems like it is Redhat, Fedora, CentOS or one of those, but that is just a guess as you didn't tell us.

Peace,
JimBass
 
Old 05-20-2007, 08:02 AM   #3
Richard01
LQ Newbie
 
Registered: May 2007
Location: Norwich, UK
Distribution: Suse 10.1
Posts: 3

Original Poster
Rep: Reputation: 0
Re:

Hi, thanks for that. Im running Suse 10.1 (have updated profile now). I did give it a try (moving my zone files to var/named/slaves, but it had no effect. Have you get any other suggestions?

Thanks in advance

Richard
 
Old 05-20-2007, 10:09 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Once you create the zone files in the new directory, you're not quite done. You need to change the named.conf file, telling it that the zone should now be in /var/named/slaves, you have to have the zone in /var/named/slaves, and you need to restart the BIND process. I suspect that all of that didn't happen.

Peace,
JimBass
 
Old 05-21-2007, 01:09 PM   #5
Richard01
LQ Newbie
 
Registered: May 2007
Location: Norwich, UK
Distribution: Suse 10.1
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Jim, I have done all that, but my directory is not /var/named/slaves, its /var/lib/named/var/named/slaves, because named is running chrooted. Anyway, its still not happy.

Thanks for all your help so far.

Richard.
 
Old 05-21-2007, 10:19 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
It could be that when you restarted named, the old version didn't die. Please stop named and check that it is dead, (try "ps aux | grep named"), then start it up. Alos, please post both the part of your named.conf file that deals with the zone in question, and also post the results of "ls -al" in /var/lib/named/var/named/slaves.

Peace,
JimBass
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPD is updating BIND with <host>.<domain>.<domain>. diabelek Linux - Networking 15 10-11-2007 05:58 AM
DDNS with BIND and ISC-DHCPD joel112 Linux - Software 1 05-25-2006 11:06 AM
BIND 9/DHCPD DDNS Not Functioning Corxscrew Linux - Networking 2 02-07-2005 05:43 AM
dhcpd , bind, iptables gateway help munkie_poo Linux - Networking 1 01-25-2005 04:21 AM
dhcpd and/or BIND (named) problem sneumyer Linux - Networking 2 09-06-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration