diff options
author | Warren Baker <warren@decoy.co.za> | 2014-04-25 20:55:44 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2014-04-25 20:55:44 +0200 |
commit | 6374fb5705ce172491f0b3cefd2d98a3c95ae435 (patch) | |
tree | 2cdcb06d2d5003247dd00d23a0bb44aee590a001 | |
parent | 5c048099a6972a51e5298e30b2f9df37eb338bfc (diff) | |
download | pfsense-6374fb5705ce172491f0b3cefd2d98a3c95ae435.zip pfsense-6374fb5705ce172491f0b3cefd2d98a3c95ae435.tar.gz |
Make sure to actually configure the outgoing query interfaces if selected.
-rw-r--r-- | etc/inc/unbound.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index b36f120..ec6f773 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -138,6 +138,18 @@ EOF; $bindints .= "interface: ::0\n"; } + // Determine interfaces to run on + $outgoingints = ""; + if (!empty($config['unbound']['outgoing_interface'])) { + $outgoingints = "# Outgoing interfaces to be used\n"; + $outgoing_interfaces = explode(",", $config['unbound']['outgoing_interface']); + foreach($outgoing_interfaces as $outif) { + $outip = get_interface_ip($outif); + if (!is_null($outip)) + $outgoingints .= "outgoing-interface: $intip\n"; + } + } + // Allow DNS Rebind for forwarded domains if ((isset($config['unbound']['domainoverrides']) && is_array($config['unbound']['domainoverrides'])) && !isset($config['system']['webgui']['nodnsrebindcheck'])) { $private_domains = "# Set private domains in case authoritative name server returns a Private IP address\n"; @@ -265,6 +277,7 @@ prefetch-key: {$prefetch_key} {$statistics} # Interface IP(s) to bind to {$bindints} +{$outgoingints} # DNS Rebinding {$private_addr} |