unbound: manage the use of stub zones.

This commit is contained in:
Andrea Dell'Amico 2019-11-08 11:37:49 +01:00
parent 9687e342c8
commit 9b5acb19b3
2 changed files with 22 additions and 0 deletions

View File

@ -29,3 +29,9 @@ unbound_so_reuseport: 'yes'
# with libevent
unbound_outgoing_range: 8192
unbound_num_queries_per_thread: 4096
# Stub zones
# One of stub_host or stub_addr must be defined
# stub_prime and stub_first are both optional, default 'yes'
#unbound_stub_zones:
# - { name: '', stub_addr: '', stub_host: '', stub_prime: '', stub_first: '' }

View File

@ -42,3 +42,19 @@ server:
do-daemonize: no
{% endif %}
{% if unbound_stub_zones is defined %}
{% for zone in unbound_stub_zones %}
stub-zone:
name: {{ zone.name }}
{% if zone.stub_host is defined %}
stub-host: {{ zone.stub_host }}
{% endif %}
{% if zone.stub_addr is defined %}
stub-addr: {{ zone.stub_addr }}
{% endif %}
stub-prime: {{ zone.stub_prime | default('yes') }}
stub-first: {{ zone.stub_first | default('yes') }}
{% endfor %}
{% endif %}