DanJourno
asked on
Setting Up BIND
Hi,
I've got a Windows server running as a Primary DNS.
I want to set up a secondary DNS on Centos so that I can make DNS changes if the primary DNS goes down.
I've installed Bind and set up the config files following a guide but i'm getting the following when i start the NAMED service.
Error in named configuration:
zone localhost/IN: loading master file /var/named/localhost.zone: file not found
_default/localhost/IN: file not found
Im not sure what to do now. I've tried changing the directory to /var/named instead of /etc but that didnt help.
Thanks
Dan
I've got a Windows server running as a Primary DNS.
I want to set up a secondary DNS on Centos so that I can make DNS changes if the primary DNS goes down.
I've installed Bind and set up the config files following a guide but i'm getting the following when i start the NAMED service.
Error in named configuration:
zone localhost/IN: loading master file /var/named/localhost.zone:
_default/localhost/IN: file not found
Im not sure what to do now. I've tried changing the directory to /var/named instead of /etc but that didnt help.
Thanks
Dan
From /var/named/localhost.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 127.0.0.1
IN AAAA ::1
From "/var/named/chroot/etc/named.conf"
options {
directory "/etc";
pid-file "/var/run/named/named.pid";
recursion no;
};
zone "company.com" {
type slave;
file "company.com.zone";
masters {
1.2.3.4;
};
};
zone "localhost" {
type master;
file "/var/named/localhost.zone";
};
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, it runs successfully now.
however, it doesnt seem to be downloading the zone from the primary server. i've checked the primary server and its allowing zone transfers.
any ideas how i can diagnose this?
thanks
dan
however, it doesnt seem to be downloading the zone from the primary server. i've checked the primary server and its allowing zone transfers.
any ideas how i can diagnose this?
thanks
dan
Please show logfile, from this mashine, and if possible - from primary NS.
Ensure on your primary server that your backup is has an NS record.
If you dont want to make the slave/backup known, then you will need to set its ip address in the allowed to (zone)transfer list. (NS record hosts should be allowed by default.)
If you dont want to make the slave/backup known, then you will need to set its ip address in the allowed to (zone)transfer list. (NS record hosts should be allowed by default.)
ASKER
Please show logfile, from this mashine, and if possible - from primary NS.
Where are the BIND logs kept in centos?
The Primary server doesnt show anything unusual in the logs.
Thanks
Dan
ASKER
you will need to set its ip address in the allowed to (zone)transfer list. (NS record hosts should be allowed by default
I've got the option checked that says Allow Transfers to Any Server.
Thanks
Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks.
it was a permissions issue.
it was a permissions issue.
Good to hear you got it working.
If needed create the zone file.
It may need to be in the chroot folder (or not) so try one location then the other
I would try the choot one first, then copy to the other if it still errors.
/var/named/named.localhost
/var/named/chroot/var/name
Zone file data for the localhost
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
After you setup the zone file set the correct permissions
chmod 0640 named.localhost
chown root:namd named.localhost
then restart named/bind