BIND’s views are a feature some people like using because they allow a single server instance to respond distinctly depending on, say, the source address used to query the instance. I actually quite dislike BIND views because they complicate configuration, and as such I typically advise against using them. (If you’re ever really bored, try configuring AXFR from one view to the other; it’s possible, and it’s horrid. ;-)
Unbound’s views can be used to serve local data depending on the source address a query is received on. Let’s look at a small example:
local-data globally, so queries to this instance should return the following for
The view named
intview defines an alternative response, which is used when a query comes in to 127/8, as defined in the
There may be multiple view clauses, and options from views matching an access control statement will be used and override global options. On the other hand, global options are used if no matching view is found.
It doesn’t appear to be possible to use views other than for local data, which is fine, if you ask me. :-)