From 6cef1b30855fef09e38c98b7e8807c9521dc6814 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 1 Mar 2017 11:25:28 +0100 Subject: [PATCH] Setup interface listening behavior of dnsmasq --- scripts/pi-hole/php/savesettings.php | 24 +++++++++++++++++++++ settings.php | 31 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index be057563..84c78de1 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -174,11 +174,35 @@ function readStaticLeasesFile() $extra .= "no-dnssec"; } + // Check if DNSinterface is set + if(isset($_POST["DNSinterface"])) + { + if($_POST["DNSinterface"] === "single") + { + $DNSinterface = "single"; + } + elseif($_POST["DNSinterface"] === "all") + { + $DNSinterface = "all"; + } + else + { + $DNSinterface = "local"; + } + } + else + { + // Fallback + $DNSinterface = "local"; + } + $return .= exec("sudo pihole -a -i ".$DNSinterface." -web"); + // If there has been no error we can save the new DNS server IPs if(!strlen($error)) { $IPs = implode (",", $DNSservers); exec("sudo pihole -a setdns ".$IPs." ".$extra); + $success .= htmlspecialchars($return)."
"; $success .= "The DNS settings have been updated (using ".count($DNSservers)." DNS servers)"; } else diff --git a/settings.php b/settings.php index cf53aa60..469be26e 100644 --- a/settings.php +++ b/settings.php @@ -469,6 +469,23 @@ } else { $DNSSEC = false; } + + if(isset($setupVars["DNSMASQ_LISTENING"])){ + if($setupVars["DNSMASQ_LISTENING"] === "single") + { + $DNSinterface = "single"; + } + elseif($setupVars["DNSMASQ_LISTENING"] === "all") + { + $DNSinterface = "all"; + } + else + { + $DNSinterface = "local"; + } + } else { + $DNSinterface = "local"; + } ?>
@@ -534,6 +551,20 @@

Validate DNS replies and cache DNSSEC data. When forwarding DNS queries, Pi-hole requests the DNSSEC records needed to validate the replies. Use Google or Norton DNS servers when activating DNSSEC. Note that the size of your log might increase significantly when enabling DNSSEC. A DNSSEC resolver test can be found here.

+ +
+ +
+ +
+
+ +
+
+ +
+
+