I have BIND DNS server installed in my LAN on Linux CentOS on IP 192.168.0.30. I also have HTTPD Web server installed in my LAN on Linux Centos on IP 192.168.0.23. My /etc/named.conf file is configured to use the /etc/forward.example.com zone file.
zone "example.com" IN {
type master;
file "/etc/forward.example.com";
allow-update { none; };
};
Following the instructions in chapter 16.3 of the CentOS deployment guide, I have the following in my BIND forward zone file to create an A record to the IP address of the HTTPD Web server, and also to map a CNAME to the HTTPD Web server.
$ORIGIN example.com.
$TTL 1D
@ IN SOA ns1.example.com. hostmaster.example.com. (
2016032200 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ; minimum
)
@ IN NS ns1.example.com.
ns1 IN A 192.168.0.30
server1 IN A 192.168.0.23
www IN CNAME server1
The named-checkzone command produces OK, which ensures the forward.example.com zone file is OK.
[root@DNS1 ~]# named-checkzone example.com /etc/forward.example.com
zone example.com/IN: loaded serial 2016032200
OK
Running the command nslookup ns1.example.com produces the following output. This is good.
Server: 192.168.0.30
Address: 192.168.0.30#53
Name: ns1.example.com
Address: 192.168.0.30
Running the command nslookup www.example.com produces the following output.
Server: 192.168.0.30
Address: 192.168.0.30#53
** server can't find www.example.com: NXDOMAIN
Running the command nslookup server1.example.com produces the following output.
Server: 192.168.0.30
Address: 192.168.0.30#53
** server can't find www.example.com: NXDOMAIN
I am not seeing errors in the named.run file.
[root@DNS1 ~]# tail /var/named/data/named.run
zone 0.in-addr.arpa/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.168.192.in-addr.arpa/IN: loaded serial 0
zone 1.xxxxxxxxxxx.ip6.arpa/IN: loaded serial 0
zone example.com/IN: loaded serial 0
zone localhost.localdomain/IN: loaded serial 0
all zones loaded
running
Searching serverfault.com and google.com, I was unable to determine why I am getting the NXDOMAIN error. If there are any tips or recommendations, I sure would appreciate it!