summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-04-25 20:55:44 +0200
committerWarren Baker <warren@decoy.co.za>2014-04-25 20:55:44 +0200
commit6374fb5705ce172491f0b3cefd2d98a3c95ae435 (patch)
tree2cdcb06d2d5003247dd00d23a0bb44aee590a001 /etc/inc/unbound.inc
parent5c048099a6972a51e5298e30b2f9df37eb338bfc (diff)
downloadpfsense-6374fb5705ce172491f0b3cefd2d98a3c95ae435.zip
pfsense-6374fb5705ce172491f0b3cefd2d98a3c95ae435.tar.gz
Make sure to actually configure the outgoing query interfaces if selected.
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc13
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}
OpenPOWER on IntegriCloud