I already have a similar configuration working on another host with BIND 8.4.7
I'm migrating to a new name server so I decided to upgrade BIND to 9.7.3
The configuration is similar to this one, but I have added some permissive (maybe redundant) restrictions, trying to make it work.
//named.conf
options {
listen-on-v6 { any; };
listen-on { any; };
};
acl "lan" { 127.0.0.1; 192.168.x.0/24; };
view "internal" {
match-clients { "lan"; };
match-destinations { any; };
zone "foo.com" IN {
type master;
allow-query { any; };
allow-recursion { any; };
file "foo.com.internal.hosts";
};
};
view "external" {
match-clients { any; };
match-destinations { any; };
zone "foo.com" IN {
type master;
allow-query { any; };
allow-recursion { any; };
file "foo.com.hosts";
};
};
There is some testing on localhost.
//nslookup from localhost
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> bar
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find bar: NXDOMAIN
Testing on the same network.
//nslookup from "lan"
> server 192.168.x.y
Default server: 192.168.x.y
Address: 192.168.x.y#53
> bar
Server: 192.168.x.y
Address: 192.168.x.y#53
** server can't find bar: NXDOMAIN
Testing from another network fails.
//nslookup from outside "lan", 192.168.x.y NAT'd to 192.168.z.y
> server 192.168.z.y
Default server: 192.168.z.y
Address: 192.168.z.y#53
> bar
Server: 192.168.z.y
Address: 192.168.z.y#53
** server can't find bar: REFUSED
So, my question is, why this configuration does not work on the newer BIND?
dig @localhost bar.foo.com
?