enter code hereI am setting up my primary DNS server. The reverse lookup appears to work fine, it is the forward lookups that seems to be the problem.
Here are my configurations files.
/etc/default/bind9:
RESOLVCONF=no
OPTIONS="-u bind -4"
/etc/bind/named.conf.options:
acl "trusted" { 192.168.1.0; localhost; };
options {
directory "/var/cache/bind";
recursion yes;
allow-recursion { trusted; };
listen-on { 192.168.1.204; 127.0.0.1; };
allow-transfer { none; };
forwarders {
192.168.1.254;
};
// listen-on-v6 { any; };
};
/etc/bind/named.conf.local:
zone "example.home.local" {
type master;
file "etc/bind/zones/db.example.home.local";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.1.168.192";
};
/etc/bind/zones/db.example.home.local:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ubuntuserver.example.home.local. root.example.home.local. (
14 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
;name servers - NS records
@ IN NS ubuntuserver.example.home.local.
;name servers - A records
ubuntuserver IN A 192.168.1.204
;subnet - A records
ubuntuweb IN A 192.168.1.208
/etc/bind/zones/db.1.168.192:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA example.home.local. root.example.home.local. (
11 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers
@ IN NS UbuntuServer.
; PTR records
204 IN PTR ubuntuserver.example.home.local.
208 IN PTR ubuntuweb.example.home.local.
As mentioned earlier, the reverse lookup works fine. When I run
sudo named-checkzone 1.168.192.in-addr.arpa /etc/bind/zones/db.1.168.192
the results are ok and also when I do an nslookup from a test client it is able to successfully resolve the IP address to the name.
However, when I run
sudo named-checkzone example.home.local /etc/bind/zones/db.example.home.local
it reports back
loading from master file /etc/bind/zones/db.example.home.local failed: unknown class/type