Greetings,
I am trying to setup Four name servers on 2 different machines linux CentOS 5.3 the server named starts when I boot-up but if I give "service named restart command" it fails to start I shall highly appreciate if someone shall have a look at those codes and let me know what I am doing wrong the config files named.conf, addr.arpa and zone file is as follow
I have changed the IP addresses and domain names besides extension :-
include "/etc/rndc.key";
controls {
inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndckey"; };
inet 192.168.1.12 allow { 192.168.1.0/24; } keys { "rndckey"; };
};
//port 53
options {
directory "/var/named"; // Working directory
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service
};
logging {
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
acl internal {
127.0.0.1/8;
192.168.1.0/24;
};
acl external { Stathic IP address of this server; };
view "internals" {
match-clients { any; };
match-destinations { any; };
allow-query { any; };
allow-transfer { any; };
recursion yes;
forwarders { 192.168.1.10; 192.168.1.11; 192.168.1.12; 192.168.1.13; 192.168.1.14; 192.168.1.15; 192.168.1.16;};
zone "." IN {
type hint;
file "/var/named/named.root";
};
zone "localdomain." IN {
type master;
file "/var/named/localdomain.zone";
allow-update { none; };
};
zone "localhost." IN {
type master;
file "/var/named/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "/var/named/db.127.0.0";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." IN {
type master;
file "/var/named/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa." IN {
type master;
file "/var/named/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa." IN {
type master;
file "/var/named/named.zero";
allow-update { none; };
};
zone "example1.in."{
type master;
file "/var/named/internals/db.example1.in";
};
zone "example2.net."{
type master;
file "/var/named/internals/db.example2.net";
};
zone "example3.net."{
type master;
file "/var/named/internals/db.example3.net";
};
zone "example4.in."{
type master;
file "/var/named/internals/db.example4.in";
};
zone "168.192.in-addr.arpa." {
type master;
notify no;
file "/var/named/internals/db.192.168";
allow-transfer { 192.168.1.10; 192.168.1.11; 192.168.1.12;};
};
};
view "external" {
match-clients { any; };
match-destinations { any; };
allow-transfer { 59.181.121.151; };
recursion no;
zone "." IN {
type hint;
file "/var/named/named.root";
};
zone "57.83.in-addr.arpa." {
type master;
file "/var/named/externals/db.57.83";
};
zone example1.in."{
type master;
file "/var/named/internals/db.example1.in";
allow-update { none; };
allow-transfer { Ip of slave DNS server; };
};
zone "example2.net."{
type master;
file "/var/named/internals/db.example2.net";
allow-update { none; };
allow-transfer { Ip of slave DNS server; };
};
zone "example3.net."{
type slave;
file "/var/named/externals/db.example3.net";
masters { Ip of master DNS server; };
};
zone "example4.in."{
type slave;
file "/var/named/externals/db.example4.in";
masters { Ip of master DNS server; };
};
};
Internal Zone are as follows
$TTL 86400
dalvis.in. IN SOA ns2.example4.in. supports.example4.in. (
1
86400
7200
2592000
86400 ; Default TTL
)
NS localhost.
NS ns2.example4.in.
External zone are as follows :-
$TTL 86400
@ SOA ns2.example4.in. root.example4.in.(
1
86400
7200
2592000
345600
)
NS localhost.
NS ns2.example4.in.
example4.in. IN A Ip of web host server
example4.in. IN MX 0 example4.in.
example4.in. IN MX 5 mail.example4.in.
example4.in. IN MX 10 smtp.example4.in.
mail IN A Ip of master web host server
ftp IN A Ip of master web host server
www IN A Ip of master web host server
webmail IN A Ip of master web host server
3dsecure IN A Ip of master web host server
imap IN A Ip of master web host server
mail IN A Ip of master web host server
smtp IN A Ip of master web host server
-------------------
addr.arpa external
db.57.83
------------------
$TTL 86400
57.83.in-addr.arpa. SOA ns1.example1.in. supports.example1.in (
2
86400
7200
2592000
345600
)
NS localhost.
NS ns1.example1.in.
13.162 PTR ns2.example3.in.
13.162 PTR ns2.example4.in.
13.162 PTR ns1.example2.net.
13.162 PTR ns1.example1.in.
12.179 PTR ns1.example3.net.
12.179 PTR ns1.example4.in.
12.179 PTR ns2.example2.net.
12.179 PTR ns2.example1.in.
13.162 IN PTR example1.in.
13.162 IN PTR
www.example1.in.
13.162 IN PTR ftp.example1.in.
13.162 IN PTR 3dsecure.example1.in.
13.162 IN PTR smtp.example1.in.
13.162 IN PTR mail.example1.in.
13.162 IN PTR webmail.example1.in.
13.162 IN PTR imap.example1.in.
13.162 IN PTR example2.net.
13.162 IN PTR
www.example2.net.
13.162 IN PTR ftp.example2.net.
13.162 IN PTR 3dsecure.example2.net.
13.162 IN PTR smtp.example2.net.
13.162 IN PTR mail.example2.net.
13.162 IN PTR webmail.example2.net.
13.162 IN PTR imap.example2.net.
12.179 IN PTR example3.net.
12.179 IN PTR
www.example3.net.
12.179 IN PTR ftp.example3.net.
12.179 IN PTR 3dsecure.example3.net.
12.179 IN PTR webmail.example3.net.
12.179 IN PTR imap.example3.net.
12.179 IN PTR mail.example3.net.
12.179 IN PTR smtp.example3.net.
12.179 IN PTR dPanel.example3.net.
12.179 IN PTR webhosting.example3.net.
12.179 IN PTR example4.in.
12.179 IN PTR
www.example4.in.
12.179 IN PTR ftp.example4.in.
12.179 IN PTR 3dsecure.example4.in.
12.179 IN PTR webmail.example4.in.
12.179 IN PTR imap.example4.in.
12.179 IN PTR mail.example4.in.
12.179 IN PTR smtp.example4.in.
---------------
Internal addr.arpa
db.192.168
---------------
$TTL 86400
@ SOA localhost. root.localhost. (
1
86400
7200
2592000
86400
)
NS localhost.
10.1 IN PTR ns1.example1.in.
10.1 IN PTR ns1.example2.net.
10.1 IN PTR ns2.example3.net.
10.1 IN PTR ns2.example4.in.
12.1 IN PTR example2.net.
12.1 IN PTR dPanel.example2.net.
12.1 IN PTR
www.example2.net.
12.1 IN PTR ftp.example2.net.
14.1 IN PTR mail.example2.net.
15.1 IN PTR smtp.example2.net.
15.1 IN PTR imap.example2.net.
12.1 IN PTR example1.in.
12.1 IN PTR dPanel.example1.in.
12.1 IN PTR
www.example1.in.
12.1 IN PTR ftp.example1.in.
14.1 IN PTR mail.example1.in.
15.1 IN PTR smtp.example1.in.
15.1 IN PTR imap.example1.in.
---------------
Error Log
---------------
Nov 24 10:31:57 localhost named[2199]: zone example3.net/IN/external: refresh: retry limit for master 57.83.12.179#53 exceeded (source 0.0.0.0#0)
Nov 24 10:31:57 localhost named[2199]: zone example3.net/IN/external: Transfer started.
Nov 24 10:35:06 localhost named[2199]: transfer of 'example3.net/IN' from 57.83.12.179#53: failed to connect: timed out
Nov 24 10:35:06 localhost named[2199]: transfer of 'example3.net/IN' from 57.83.12.179#53: end of transfer
Nov 24 11:02:18 localhost named[2199]: zone example4.in/IN/external: refresh: retry limit for master 57.83.12.179#53 exceeded (source 0.0.0.0#0)
Nov 24 11:02:18 localhost named[2199]: zone example4.in/IN/external: Transfer started.
Nov 24 11:05:27 localhost named[2199]: transfer of 'example4.in/IN' from 57.83.12.179#53: failed to connect: timed out
Nov 24 11:05:27 localhost named[2199]: transfer of 'example4.in/IN' from 57.83.12.179#53: end of transfer
Nov 24 11:24:05 localhost named[2199]: FORMERR resolving 'crawl-66-249-67-50.googlebot.com/AAAA/IN': 192.168.1.11#53
Nov 24 11:24:05 localhost named[2199]: FORMERR resolving 'crawl-66-249-67-50.googlebot.com/AAAA/IN': 192.168.1.16#53
Thanking you with best regards.
Tariq Dalvi