Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

With a zone in bind, is it possible to split up the zone between two servers (internal and external for example) and have the internal server resolve requests for 'bar.com'. If the record isn't in in that servers zone, forward to the external server which has the same 'bar.com' zone with external records?

The forward option in Bind has 'first' on 'only' as options. 'First being the opposite of what I'm looking for.

"if set to 'first' (default) it will send the queries to the forwarder and if not answered will attempt to answer the query."

I'm looking for a 'last' option where "if set to 'last' it will attempt to answer the query, otherwise send the query to the forwarder"

share|improve this question
    
Can I ask why you need such behavior? –  Khaled Nov 11 '11 at 13:39
    
We have many external subdomains off of 'bar.com' that aren't on the internal server. I'd like to not have to replicate those on the internal side of things. –  sbr9132 Nov 11 '11 at 17:53
    
You want them to be accessible from internal as well, but do not what them to be stored on internal server. What's the point ? Why NOT to have them on internal too ? Or why not to have it all only on "external" and use internal as forwarder only. It only adds headache to maintain two different zones for one well, zone. –  Sandman4 Nov 12 '11 at 19:24

1 Answer 1

The answer (as you suspected) is no. There is currently no provision in bind to do what you're asking. If your internal server responds as authoritative for a zone, it assumes it has all knowledge of that zone.

That said, it might be worth attempting to delegate the external subdomains using NS records.

internal zone:

$ORIGIN bar.com.
$TTL 14400  ; 4 hours
bar.com.    IN SOA  ns1-int.bar.com. admin.bar.com. (
                2012020206  ; serial
                86400       ;refresh (1 day)
                600     ;retry (10 minutes)
                1814400     ;expire (3 weeks)
                60      ;minimum (1 minute)
                )
            IN  NS  ns1-int.bar.com.
            IN  NS  ns2-int.bar.com.
; define internal nameservers
ns1-int.bar.com.    IN  A   10.0.1.1
ns2-int.bar.com.    IN  A   10.0.1.2

; internal records
www.bar.com.    IN  A   10.0.0.1
db.bar.com.     IN  A   10.0.0.2
proxy.bar.com.  IN  A   10.0.0.3
; define external nameservers
ns1.bar.com.    IN  A   2.3.4.5
ns2.bar.com.    IN  A   2.3.5.6

; delegate subdomain foo to external nameservers
foo.bar.com.    IN  NS  ns1.bar.com.
foo.bar.com.    IN  NS  ns2.bar.com.

At this point, your internal dns server (assuming it allows recursion for localnets) will go to ns1.bar.com if it receives a request for foo.bar.com.

Of course, you have to do this for every subdomain you want to refer to the outside servers, but after the initial setup for each external subdomain you will not have to mess with the internal zone anymore whenever changes are made to the external subdomain records.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.