0
I'm having some issues with my bind9 dns cache returning an answer to any query. Why? Can I disable that behavior somehow?
nslookup not.a.valid.query
Server: UnKnown
Address: 192.168.0.1
Non-authoritative answer:
Name: not.a.valid.query.robertfoss.se
Address: *my public ip address*
If I disable the line option domain-name "robertfoss.se";
in my dhcpd.conf
(and restart the service) the same query results in the much more sane dns-answer:
nslookup not.a.valid.query
Server: UnKnown
Address: 192.168.0.1
bind9 named.conf.options
options {
directory "/var/cache/bind";
forwarders {
81.88.9.218;
8.8.8.8;
81.88.9.220;
8.8.4.4;
};
// Security options
allow-query {127.0.0.1; 192.168.0.0/24; };
allow-recursion { 127.0.0.1; 192.168.0.0/24; };
allow-transfer { none; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
I'm running bind9 on a ubuntu host.
The problem is that queries that arent related to me nor valid are such as "a bad query" are returned as a.bad.query.robertfoss.se. Why is that? I've updated the question with some new findings. – Robert Foss – 2011-05-05T06:58:55.403
Updated based on the new information, dnsmasq is much easier to use as a caching name server and it has a dhcp server built-in that will serve client hostnames automatically. – h0tw1r3 – 2011-05-07T07:51:00.633
You have an domain option, which means each time you query a name, you will first try to resolve name.robertfoss.se As there is a wildcard entry in robertfoss.se, there will always be an answer. – slubman – 2011-05-07T07:52:07.280