pfsense:unbound:views
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
pfsense:unbound:views [2020/04/12 00:02] – peter | pfsense:unbound:views [2020/05/13 19:05] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PFSense - Unbound - Views ====== | ||
- | |||
- | |||
- | 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: | ||
- | |||
- | < | ||
- | server: | ||
- | ... | ||
- | | ||
- | |||
- | | ||
- | | ||
- | |||
- | view: | ||
- | name: " | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | I define local-zone and local-data globally, so queries to this instance should return the following for my.aa/A: | ||
- | |||
- | < | ||
- | ;; ->> | ||
- | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | ||
- | |||
- | ;; ANSWER SECTION: | ||
- | my.aa. 3600 IN A 1.1.1.1 | ||
- | |||
- | ;; Query time: 8 msec | ||
- | ;; SERVER: 192.168.1.130# | ||
- | </ | ||
- | |||
- | The view named intview defines an alternative response, which is used when a query comes in to 127/8, as defined in the access-control-view statement: | ||
- | |||
- | < | ||
- | ;; ->> | ||
- | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | ||
- | |||
- | ;; ANSWER SECTION: | ||
- | my.aa. 90 IN A 2.2.2.2 | ||
- | |||
- | ;; Query time: 0 msec | ||
- | ;; SERVER: 127.0.0.2# | ||
- | </ | ||
- | |||
- | 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. | ||
- | |||
- | <WRAP info> | ||
- | It doesn’t appear to be possible to use views other than for local data. | ||
- | </ | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ====== References ====== | ||
- | |||
- | [[PFSense: | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
pfsense/unbound/views.1586649769.txt.gz · Last modified: 2020/07/15 09:30 (external edit)