I am trying DNS + DHCP on Fedora 7. I am getting following error. May I request you to please have a look and point the fault where I am wrong.
I have installed DNS with the following command:
#yum install bind-chroot caching-nameserver
Next, I did,
chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
chkconfig --levels 235 named on
/etc/init.d/named start
I have then edited the named.conf and added few more zone files viz. 155.30.10.in-addr.arpa,named.bind, etc (named.conf follows)
Code:
[root@foocat named]# /etc/init.d/named start
Starting named:
Error in named configuration:
zone localdomain/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
zone foo.net.zone/IN: loaded serial 42
zone 155.30.10.in-addr.arpa/IN: loading from master file 155.30.10.in-addr.arpa failed: permission denied
standard-in/155.30.10.in-addr.arpa/IN: permission denied
zone 0.in-addr.arpa/IN: loading from master file named.network failed: permission denied
standard-in/0.in-addr.arpa/in: permission denied
zone 255.in-addr.arpa/IN: loaded serial 42
zone bind/CH: loading from master file named.bind failed: permission denied
ultimate-chaos/bind/chaos: permission denied
[FAILED]
permission's are as under :
Code:
-rw-r----- 1 root named 594 2007-06-17 14:31 155.20.10.in-addr.arpa
lrwxrwxrwx 1 root named 6 2007-05-24 18:42 chroot -> ../../
drwxrwx--- 2 named named 4096 2004-08-26 02:21 data
-rw-r----- 1 root named 198 2007-05-27 14:46 foo.net.zone
-rw-r----- 1 root named 198 2006-09-11 14:43 localdomain.zone
-rw-r----- 1 root named 195 2006-09-11 14:43 localhost.zone
-rw-r----- 1 root named 577 2007-06-17 12:25 named.bind
-rw-r----- 1 root named 427 2006-09-11 14:43 named.broadcast
-rw-r----- 1 root named 2518 2006-09-11 14:43 named.ca
-rw-r----- 1 root named 424 2006-09-11 14:43 named.ip6.local
-rw-r----- 1 root named 426 2006-09-11 14:43 named.local
-rwxr-xr-x 1 root named 480 2007-06-17 12:24 named.network
-rw-r----- 1 root named 427 2006-09-11 14:43 named.zero
drwxrwx--- 2 named named 4096 2004-07-27 20:27 slaves
My /etc/resolv.conf
Code:
#Local domain name
domain foo.net
#Domain on which a host name is search fisrt)
; generated by /sbin/dhclient-script
search foo.net
nameserver 10.30.155.1
nameserver (ISP's nameserver-1)
nameserver (ISP's nameserver-2)
/etc/hosts
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.naughtycat.dishs.net localhost
192.168.1.13 naughtycat.dishs.net
~
My named.conf
Code:
// /var/named/chroot/etc/named.conf
//domain foo.net
//First off is the key. To modify the running server you need
//this, the same as in the dhcpd.conf file.
key dhcpupdate {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
};
acl "home" { 10.30.155.0/24; 127.0.0.1; };
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
listen-on { "home"; };
allow-query { "home"; };
allow-recursion { "home"; };
allow-transfer { none; };
notify no;
forwarders { xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx; };
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; 10.30.155.1; }
keys { "catdhcpupdate"; };
};
view "standard-in" in {
zone "." {
type hint;
file "named.ca";
};
//zone for local domain
zone "localdomain" IN {
type master;
file "localdomain.zone";
// allow-update { key "dhcpupdate"; };
notify no;
};
zone "localhost" IN {
type master;
file "localhost.zone";
// allow-update { key "dhcpupdate"; };
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
// allow-update { key "dhcpupdate"; };
};
//Forward lookup for foo.net
zone "foo.net.zone" {
type master;
file "foo.net.zone";
allow-update { key "dhcpupdate"; };
};
zone "155.30.10.in-addr.arpa" IN {
type master;
file "155.30.10.in-addr.arpa";
allow-update { key "dhcpupdate"; };
notify no;
};
zone "0.in-addr.arpa" {
type master;
file "named.network";
};
zone "255.in-addr.arpa" {
type master;
file "named.broadcast";
};
};
view "ultimate-chaos" chaos {
recursion no;
zone "." {
type hint;
file "/dev/null";
};
zone "bind" {
type master;
file "named.bind";
};
};
Regards