How does one include a view in another? I have a view which matches one client that I also want to be able to see the view right after, but it stops at its first match.
Thanks! jlc
On Mon, May 26, 2008 at 6:32 PM, Joseph L. Casale JCasale@activenetwerx.com wrote:
How does one include a view in another? I have a view which matches one client that I also want to be able to see the view right after, but it stops at its first match.
In those cases, typically you setup one file for each kind (only-in-view1.inc, only-in-view2.inc, in-both-views.inc) and then include them appropriately in each view's zone file. I don't think there is a way to stop processing after the first match, since BIND's "include" mechanism is actually like macro processing.
HTH, Filipe
In those cases, typically you setup one file for each kind (only-in-view1.inc, only-in-view2.inc, in-both-views.inc) and then include them appropriately in each view's zone file. I don't think there is a way to stop processing after the first match, since BIND's "include" mechanism is actually like macro processing.
HTH, Filipe
Filipe, I am definitely not an authority on Bind, so I am little confused :) I have two views, internal which matches local nets/local host. Its a recursive caching only server. The last view. external is no recursive and authoritive for one domain and is set to match external hosts only.
When I nslookup from inside the network, it seems it matches the first view and then stops, so the client cant lookup any info for the second views authoritive zone.
I wondered if I could include the "external" view in the first view, or I suppose I can simply copy the details from the second view into the first, but that forces me to keep it updated in two places...
Thanks! jlc
On Tue, May 27, 2008 at 11:12 AM, Joseph L. Casale JCasale@activenetwerx.com wrote:
I wondered if I could include the "external" view in the first view, or I suppose I can simply copy the details from the second view into the first, but that forces me to keep it updated in two places...
Use includes for the common parts. You create a "common.inc" or similar, and then include this file from both the internal and external view. When you have to change something in the common area, you just have to edit it in common.inc (except for the serial of the zones, which you will still have to increment in both.)
IIRC the syntax is:
$INCLUDE common.inc
Please refer to bind documentation for more information on this statement.
HTH, Filipe