From 2a88eb374dfb533c2699c3dfb038ef6ee921ce3e Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Thu, 22 Dec 2011 18:25:24 +0200 Subject: Ensure loopback address is not affected --- config/unbound/unbound.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/unbound') diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc index 26109224..6588c5c2 100644 --- a/config/unbound/unbound.inc +++ b/config/unbound/unbound.inc @@ -403,16 +403,16 @@ function unbound_resync_config() { foreach($unboundnetcfg as $netent) { foreach($netent as $entry) { # If virtual interface then skip - if (!$entry['network'] && !$entry['subnet']) + if (!$entry['network'] && !$entry['subnet'] && ($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1")) continue; $unbound_bind_interfaces .="interface: {$entry['ipaddr']}\n"; - if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1" ) + if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1") $unbound_allowed_networks .= "access-control: {$entry['network']}/{$entry['subnet']} allow\n"; } } if($unboundquerycfg = unbound_get_query_interface_addresses()) { + $unbound_query_interfaces = "# Interfaces to query from\n"; foreach($unboundquerycfg as $qent) { - $unbound_query_interfaces = "# Interfaces to query from\n"; foreach($qent as $entry) $unbound_query_interfaces .= "outgoing-interface: {$entry['ipaddr']}\n"; } -- cgit v1.2.3