summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorJean Cyr <jcyr@dillobits.com>2014-09-24 21:26:44 -0400
committerJean Cyr <jcyr@dillobits.com>2014-09-24 21:26:44 -0400
commit31377265f065649794f414123ed9bd8f455af8d4 (patch)
tree38a25073e55a41e3b0db9ae078051da95931f259 /etc/inc
parent806bf8825c00e86d6eb3bc88bb18775f30f6c5c6 (diff)
downloadpfsense-31377265f065649794f414123ed9bd8f455af8d4.zip
pfsense-31377265f065649794f414123ed9bd8f455af8d4.tar.gz
Support IPV6 in unbound.conf
IPv6 addresses are not included in unbound config and access list
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/unbound.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 21a982a..8cd9227 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -132,6 +132,9 @@ EOF;
$intip = get_interface_ip($ubif);
if (!is_null($intip))
$bindints .= "interface: $intip\n";
+ $intip = get_interface_ipv6($ubif);
+ if (!is_null($intip))
+ $bindints .= "interface: $intip\n";
}
} else {
$bindints .= "interface: 0.0.0.0\n";
@@ -147,6 +150,9 @@ EOF;
$outip = get_interface_ip($outif);
if (!is_null($outip))
$outgoingints .= "outgoing-interface: $outip\n";
+ $outip = get_interface_ipv6($outif);
+ if (!is_null($outip))
+ $outgoingints .= "outgoing-interface: $outip\n";
}
}
@@ -643,6 +649,12 @@ function unbound_acls_config() {
$subnet_ip = gen_subnet($ifip, $subnet_bits);
$aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";
}
+ $ifip = get_interface_ipv6($ubif);
+ if (!is_null($ifip)) {
+ $subnet_bits = get_interface_subnetv6($ubif);
+ $subnet_ip = gen_subnetv6($ifip, $subnet_bits);
+ $aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";
+ }
}
// Configure the custom ACLs
OpenPOWER on IntegriCloud