0

i'm playing around with a DNS on localhost and i'm trying to add a subdomain but syslog reports it as a lame server.

i've defined my subdomain in my .db file while as follows

domain. IN SOA ns1.domain mail.domain (
      ....

 )

 IN NS ns1.domain
 ns1.domain. IN A 192.168.0.1

 subdomain IN NS ns1.subdomain.domain.
 ns1.subdomain.domain. IN A 192.168.0.1

doing dig @localhost ns1.subdomain.domain returns no answers and syslog shows it as a lame server.

or is this correct behaviour from a subdomain?

/etc/bind/named.conf.local

consist of the following lines

zone "domain"{
   type master;
   file "/etc/bind/dnstest.db";
};
3
  • 1
    Is this a typo? IN NS ns1.domain It should have a trailing ., e.g. IN NS ns1.domain.
    – guzzijason
    Oct 4, 2018 at 19:47
  • 2
    and the same for SOA record.
    – Tomek
    Oct 4, 2018 at 19:48
  • Yeah... was just going to say... (will post as an answer)
    – guzzijason
    Oct 4, 2018 at 20:20

1 Answer 1

0

You need to have both:

zone "domain"{
   type master;
   file "/etc/bind/dnstest.db";
};
zone "subdomain.domain"{
   type master;
   file "/etc/bind/subdomain.dnstest.db";
};

To be authoritative for the subdomain, you need a full set of SOA records, not just NS records in the parent zone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .