aboutsummaryrefslogtreecommitdiffstats
path: root/unbound.conf.erb
diff options
context:
space:
mode:
Diffstat (limited to 'unbound.conf.erb')
-rw-r--r--unbound.conf.erb12
1 files changed, 12 insertions, 0 deletions
diff --git a/unbound.conf.erb b/unbound.conf.erb
index 5edf4ad..27b2767 100644
--- a/unbound.conf.erb
+++ b/unbound.conf.erb
@@ -149,4 +149,16 @@ auth-zone:
<% end -%>
+<% else -%>
+# This server doesn't have a copy of our local zones, so define them as
+# stub zones instead. This is required for private zones (e.g. RFC1918)
+# to resolve correctly.
+<% local_zones.split.each do |zone| -%>
+stub-zone:
+ name: <%= zone %>
+<% ns_addrs.split.each do |ns| -%>
+ stub-addr: <%= ns %>
+<% end -%>
+
+<% end -%>
<% end %>