I have trouble setting up a new domain and can't figure out what I'm missing. This is a domain in a closed network so there will be exactly one DNS server and I'm testing this on the very server.
I have the following settings done (I'm using bind9):
/etc/bind/named.conf:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
/etc/bind/named.conf.options:
options {
directory "/var/cache/bind";
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
(What is that directory, btw?)
/etc/bind/named.conf.local:
zone "mydomain.com" {
type master;
file "mydomain.com.db";
};
zone "160.16.172.in-addr.arpa" {
type master;
file "rev.160.16.172.in-addr.arpa";
};
/etc/bind/mydomain.com.db:
$TTL 3D
@ IN SOA ns.mydomain.com. admin.mydomain.com. (
201007121
28800
3600
604800
38400
);
@ IN NS ns1
ns1 IN A 172.16.160.67
sonic.mydomain.com IN A 172.16.160.67
TXT "Network Gateway"
named-checkzone says everything is OK.
Reverse DNS also seems to work:
root@sonic:/etc/bind# dig -x 172.16.160.67
; <<>> DiG 9.7.0-P1 <<>> -x 172.16.160.67
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38189
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;67.160.16.172.in-addr.arpa. IN PTR
;; ANSWER SECTION:
67.160.16.172.in-addr.arpa. 259200 IN PTR redmine.mydomain.com.
67.160.16.172.in-addr.arpa. 259200 IN PTR gw.mydomain.com.
;; AUTHORITY SECTION:
160.16.172.in-addr.arpa. 259200 IN NS ns.mydomain.com.
;; Query time: 0 msec
;; SERVER: 172.16.160.67#53(172.16.160.67)
;; WHEN: Tue Jul 13 08:46:35 2010
;; MSG SIZE rcvd: 108
(I have a few extra domains in the reverse DNS file that I have removed from the zone file while trying to solve this.)
But the domain can't be found:
root@sonic:/etc/bind# dig mydomain.com
; <<>> DiG 9.7.0-P1 <<>> mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 45088
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mydomain.com. IN A
;; Query time: 0 msec
;; SERVER: 172.16.160.67#53(172.16.160.67)
;; WHEN: Tue Jul 13 08:49:27 2010
;; MSG SIZE rcvd: 26
I have defined the /etc/resolv.conf to only include the address of that server as the nameserver.
I'm guessing I'm missing something that is not implicitely told in the documents explaining how to setup a DNS server.