I've tried to configure my BIND-DNS server, so it will respond to to DNS requests made to a subdomain mail.prognoza.cu.cc of my domain prognoza.cu.cc .
I've defined an NS record of mail.prognoza.cu.cc with the server IP as the content.
I've also configured BIND as followed:
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "mail.prognoza.cu.cc" IN {
type master;
file "/var/named/prognoza.cu.cc.zone";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
here is prognoza.cu.cc.zone:
@ IN SOA ns1.prognoza.cu.cc. hostmaster.prognoza.cu.cc. (
2013042201 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
3600 ;Minimum TTL
)
; Specify our two nameservers
IN NS localhost.
; Resolve nameserver hostnames to IP, replace with your two droplet IP addresses.
ns1 IN A 31.220.108.9
; Define hostname -> IP pairs which you wish to resolve
@ IN A 31.220.108.9
www IN A 31.220.108.9
For some reason it doesn't work. Whenever I nslookup mail.prognoza.cu.cc, it fails, and this is the result of dig, within the server:
dig mail.prognoza.cu.cc ANy
; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3.1 <<>> mail.prognoza.cu.cc ANy
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 20200
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.prognoza.cu.cc. IN ANY
;; Query time: 39 msec
;; SERVER: 31.220.19.53#53(31.220.19.53)
;; WHEN: Tue Feb 14 06:34:41 IST 2017
;; MSG SIZE rcvd: 37
For some reason, no record is found.
Can someone figure out what the problem is?
EDIT
named-checkzone mail.prognoza.cu.cc /var/named/prognoza.cu.cc.zone
returns:
named-checkzone mail.prognoza.cu.cc /var/named/prognoza.cu.cc.zone
/var/named/prognoza.cu.cc.zone:1: no TTL specified; using SOA MINTTL instead
zone mail.prognoza.cu.cc/IN: loaded serial 2013042201
OK
here is part of the named status:
Feb 15 06:46:37 hostname9727 named[19352]: zone 1.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....al 0
Feb 15 06:46:37 hostname9727 named[19352]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Feb 15 06:46:37 hostname9727 named[19352]: /var/named/prognoza.cu.cc.zone:1: no TTL specified; using SOA M...tead
Feb 15 06:46:37 hostname9727 named[19352]: zone localhost/IN: loaded serial 0
Feb 15 06:46:37 hostname9727 named[19352]: zone mail.prognoza.cu.cc/IN: loaded serial 2013042201
Feb 15 06:46:37 hostname9727 named[19352]: zone localhost.localdomain/IN: loaded serial 0
Feb 15 06:46:37 hostname9727 systemd[1]: Started Berkeley Internet Name Domain (DNS).
Feb 15 06:46:37 hostname9727 named[19352]: all zones loaded
Feb 15 06:46:37 hostname9727 named[19352]: running
Feb 15 06:46:37 hostname9727 named[19352]: zone mail.prognoza.cu.cc/IN: sending notifies (serial 2013042201)
Hint: Some lines were ellipsized, use -l to show in full.
EDIT 2#
named-checkconf -zj
/var/named/prognoza.cu.cc.zone:1: no TTL specified; using SOA MINTTL instead
zone mail.prognoza.cu.cc/IN: loaded serial 2013042201
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.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: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0