summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-10-01 21:27:22 +0200
committerWarren Baker <warren@decoy.co.za>2011-10-01 21:27:22 +0200
commit69508c4706b40f5d7d8ac68e0d71628dd7e3f00b (patch)
tree7bcf940a5a74884057aff676452a0d398f275511 /etc/inc/unbound.inc
parent84612dd7b1920e64692a9ff8c49791d6853d8074 (diff)
downloadpfsense-69508c4706b40f5d7d8ac68e0d71628dd7e3f00b.zip
pfsense-69508c4706b40f5d7d8ac68e0d71628dd7e3f00b.tar.gz
Handle domain overrides and adjust config order
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc33
1 files changed, 17 insertions, 16 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 86489e8..507ef12 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -35,11 +35,11 @@
*/
+/* Handle Domain overrides and DNS Rebinding domains */
function unbound_add_domain_overrides($pvt=false) {
global $config;
- $domains = $config['unbound']['domainoverrides'];
-
+ $domains = $config['dns']['domainoverrides'];
$sorted_domains = msort($domains, "domain");
$result = array();
@@ -66,7 +66,10 @@ function unbound_add_domain_overrides($pvt=false) {
$domain_entries .= "\tstub-prime: no\n";
}
}
- return $domain_entries;
+ if($pvt == true)
+ return $domain_entries;
+ else
+ file_put_contents("{$g['unbound_chroot_path']}/etc/domainoverrides.conf", $domain_entries);
}
@@ -256,14 +259,12 @@ server:
chroot: {$g['unbound_chroot_path']}
username: "unbound"
directory: "{$g['unbound_chroot_path']}/etc"
-pidfile: "/var/run/unbound.pid"
root-hints: "root.hints"
-harden-referral-path: no
-prefetch: no
-prefetch-key: no
+pidfile: "/var/run/unbound.pid"
use-syslog: yes
port: 53
-verbosity: 1
+verbosity: {$config['loglevel']}
+harden-referral-path: no
do-ip4: yes
do-ip6: yes
do-udp: yes
@@ -279,11 +280,8 @@ infra-cache-numhosts: 10000
outgoing-num-tcp: 10
incoming-num-tcp: 10
edns-buffer-size: 4096
-statistics-interval: 7200
-extended-statistics: yes
-statistics-cumulative: yes
-cache-max-ttl: 86400
-cache-min-ttl: 0
+cache-max-ttl: {$config['cache_max_ttl']}
+cache-min-ttl: {$config['cache_min_ttl']}
harden-dnssec-stripped: yes
{$optimization['number_threads']}
{$optimization['msg_cache_slabs']}
@@ -295,11 +293,11 @@ harden-dnssec-stripped: yes
{$optimization['outgoing_range']}
{$optimization['so_rcvbuf']}
{$anchor_file}
-prefetch: {$prefetch}
-prefetch-key: {$prefetch_key}
+prefetch: {$config['prefetch']}
+prefetch-key: {$config['prefetch_key']}
# Statistics
{$statistics}
-# Interfaces
+# Interface IP(s) to bind to
interface: 0.0.0.0
interface: ::0
@@ -310,6 +308,9 @@ interface: ::0
# Static host entries
include: {$g['unbound_chroot_path']}/etc/host_entries.conf
+# Domain overrides
+include: {$g['unbound_chroot_path']}/etc/domainoverrides.conf
+
###
# Remote Control Config
###
OpenPOWER on IntegriCloud