How to forward a subzone
The solution is no to create a zone in the named.conf. The solution is to use zone delegation as follows:
$ORIGIN example.com.
$TTL 1W
@ IN SOA dnsldes.example.com. postmaster.example.com. (
6 ; serial number
3600 ; refresh [1h]
600 ; retry [10m]
86400 ; expire [1d]
3600 ) ; min TTL [1h]
;
IN NS dnsldes.example.com.
dnsldes IN A XXX.XXX.XXX.XXX
bahamas IN CNAME bdred
; Delegations and Glue
$ORIGIN sub.example.com.
@ IN NS lmzdns1.sub.example.com.
IN NS lmzdns2.sub.example.com.
lmzdns1 IN A XXX.XXX.XXX.XXX
lmzdns2 IN A XXX.XXX.XXX.XXX
This is a subdomain delegation problem:
Add NS records to your zone’s data file delegating the subdomain to the name server.
Example:
Domain: one.domain Subdomain: sub.one.domain
I need to resolve sub.one.domain only with the google public dns.
To delegate the sub.one.domain to the name server externalns.one.domain, you can add this NS record to the one.domain zone data file:
sub.one.domain. IN NS externalns.one.domain.
You’ll also need to add an A record for externalns.one.domain:
externalns.one.domain IN A 8.8.8.8