From cc5110818f3bdc04984f2fdb8ea00de6208cddc1 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 3 Apr 2020 09:51:59 +0000 Subject: [PATCH] Adblock: enable local DNS name resolution for DHCP clients --- installers/common.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installers/common.sh b/installers/common.sh index 0f6e07c9..ed64b16c 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -219,6 +219,10 @@ function _install_adblock() { echo "addn-hosts=$raspap_dir/adblock/hostnames.txt" | sudo tee -a "$raspap_adblock" > /dev/null || _install_error "Unable to write to $raspap_adblock" fi + # Remove dhcp-option=6 in dnsmasq.d/090_raspap.conf to force local DNS resolution for DHCP clients + echo "Enabling local DNS name resolution for DHCP clients" + sudo sed -i '/dhcp-option=6/d' $raspap_dnsmasq || _install_error "Unable to modify $raspap_dnsmasq" + echo "Enabling ad blocking management option" sudo sed -i "s/\('RASPI_ADBLOCK_ENABLED', \)false/\1true/g" "$webroot_dir/includes/config.php" || _install_error "Unable to modify config.php" echo "Done."