Hi Bathory,
Thanks for your advice. I spotted the 8.8.8.8 NS error after posting, and you definitely helped with the separation of zone files, thanks. What I have now is as follows:
/etc/named.conf ends
Code:
zone "example1.co" {
type master;
file "/var/named/example1.co.hosts";
};
zone "rev.ip.addr.in-addr.arpa" {
type master;
file "/var/named/rev.ip.addr.here.rev";
};
zone "example2.co" {
type master;
file "/var/named/example2.co.hosts";
};
/var/named/example1.co.hosts :
Code:
$ttl 259200 ;3 days
$ORIGIN example1.co.
@ IN SOA example1.co. name.example2.co. (
1362671000 ;serial number
10800 ;refresh
3600 ;update retry
604800 ;expiry
38400 ;minimum
)
IN NS example1.co.
example1.co. IN A static.ip.addr.here
/var/named/example2.co.hosts :
Code:
$ttl 259200 ;3 days
$ORIGIN example2.co.
@ IN SOA example2.co. name.example2.co. (
1362671000 ;serial number
10800 ;refresh
3600 ;update retry
604800 ;expiry
38400 ;minimum
)
IN NS example1.co.
example2.co. IN A static.ip.addr.here
IN MX 10 mail
mail IN A static.ip.addr.here
/var/named/rev.ip.addr.here.rev :
Code:
$ttl 38400
rev.ip.addr.in-addr.arpa. IN SOA example1.co. name.example2.co. (
1362671000
10800
3600
604800
38400 )
rev.ip.addr.in-addr.arpa. IN NS example1.co.
ip IN PTR example1.co.
named is complaining about A records:
Code:
systemctl status named
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.ord.sns-pb.isc.org/AAAA/IN': 2001:500:71::30#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/A/IN': 2001:500:2c::254#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/AAAA/IN': 2001:500:2c::254#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.ord.sns-pb.isc.org/AAAA/IN': 2001:4f8:0:2::19#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/A/IN': 2001:500:71::30#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/AAAA/IN': 2001:500:71::30#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/A/IN': 2001:4f8:0:2::19#53
Aug 02 12:30:47 example1.co named[3266]: error (network unreachable) resolving 'dlv.sfba.sns-pb.isc.org/AAAA/IN': 2001:4f8:0:2::19#53
Aug 02 13:30:44 example1.co named[3266]: error (network unreachable) resolving './DNSKEY/IN': 2001:500:2d::d#53
Aug 02 13:30:44 example1.co named[3266]: error (network unreachable) resolving './NS/IN': 2001:500:2d::d#53
I'm fairly sure that most of the syntact is correct now, except for the example2 zone file. For example should the final line read:
mail IN A example2.co.
When I restart named I do not get any errors, but if I run the status 10 min later I get the above issues. The domains were being hosted on another server, and if I dig the domains I get the old servers IP address in response:
Code:
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> example2.co
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 412
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;example2.co. IN A
;; ANSWER SECTION:
example2.co. 600 IN A old.ip.addr.here
;; Query time: 38 msec
;; SERVER: router.ip.addr.here#53(router.ip.addr.here)
;; WHEN: Thu Aug 07 09:20:56 BST 2014
;; MSG SIZE rcvd: 55
If I dig the current IP I get the following
Code:
; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> cur.ip.addr.here
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52263
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;cur.ip.addr.here. IN A
;; AUTHORITY SECTION:
. 600 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2014080601 1800 900 604800 86400
;; Query time: 40 msec
;; SERVER: router.ip.addr.here#53(router.ip.addr.here)
;; WHEN: Thu Aug 07 09:22:58 BST 2014
;; MSG SIZE rcvd: 118
Thanks for any help your able to give.