I have a domain internal.example.com
and a second domain foo.bar.com
. Each of these domains has their own bind9 instance.
I would like to be able to access records in foo.bar.com
using the subdomain foo.internal.example.com
. ie I want the lookup xx.foo.internal.example.com
to forward to the foo.bar.com
DNS server as xx.foo.bar.com
.
Is there a way to do this in bind9?
Sounds like you might be able to use the (otherwise rarely seen) DNAME record.
For instance, in the
internal.example.com
zone:A query for
xx.foo.internal.example.com
would then return a synthesized CNAME pointing toxx.foo.bar.com
.You can point both zones to the same zone file...
As long as you use the shorthand
@
and short hostnames likehost1 IN A 10.1.2.3
and not the FQDN such ashost1.foo.bar.com. IN A 10.1.2.3
in your zone file...