From patchwork Wed Mar 6 03:59:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2135 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id BD85288B509 for ; Tue, 5 Mar 2019 16:59:28 +0000 (GMT) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44DNR42L92z57JhP; Tue, 5 Mar 2019 16:59:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1551805168; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe:list-post; bh=XsXeLq88Mh0NTlNKXKetjdQ9nUgd8pc4pnjEnvB+b98=; b=0xnb5l/Vl3RhWO00cjjePmIJG72iYnIKeW+xrzYC7ZSh12axv81l94t84H8UCGCN2rzQlu twR4/w0DZA4yxW1ves1sscKytZHpLiRNh5VSm8UFtGTaNX5WZ3DwnpIQt5fU7Wfox+mijW qNalyOcWB9ltOnDuB8W0dfZvJEH2/UUU9jLVIRGuj8FVMJ6p4vDhuJum1zOoVjF0rLGqWf yyNVQDV8fgJVnk/ug/+mTWg1HcupDXR/34i9281OZ0/mWwwOXJI9juHCOuhI96LqTdT+vz kGWPGA8B8sGmKNHHh0ooiOveR7iyqKEoJzXzmKJSxSfDXQwh76bTT50hmJX+Ig== Received: from ipfire.tremer.co.uk (unknown [88.215.19.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44DNQy2XyYz4xxGW; Tue, 5 Mar 2019 16:59:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1551805162; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=XsXeLq88Mh0NTlNKXKetjdQ9nUgd8pc4pnjEnvB+b98=; b=Je4QsOYobT0PSVaoAewHvdwEV3xeG1SPe4OhibC8mA/0y9LTIUVf1bC5ZGmIB8wZq60mQl FpKAgwIzXHq2wBYYktr2pDapeqi60eEzwaMCp956OAyef0gk6Qmy2xfj/+GoJgiHqVRIAo fhEtUgGsP9Wbx03wJ1Gw5g4whVVROwN/jJJi6fx44wP7E1MZx0k3nZFmC2R77/PEyzhqUY K/4VkCuhmKMqOJkPFVLOERAkz75XDbw0XOiaCIKDtE1rT46knXaSUgsqhvSu1c7wrHUi+c 4BPOEnv4FXPttFIN8P72hwiF+Pm9WBI5WO0MHpSKNn5tzhaG7VDat8ze4zVL2w== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/2] unbound: Mark domains as insecure from DNS forwarding Date: Tue, 5 Mar 2019 16:59:09 +0000 Message-Id: <20190305165909.25087-2-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20190305165909.25087-1-michael.tremer@ipfire.org> References: <20190305165909.25087-1-michael.tremer@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=ms smtp.mailfrom=michael.tremer@ipfire.org X-Spamd-Result: default: False [-8.77 / 11.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-2.68)[-0.894,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:31655, ipnet:88.215.0.0/18, country:GB]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.98)[99.94%] X-Spam-Status: No, score=-8.77 X-Rspamd-Server: mail01.i.ipfire.org Cc: Michael Tremer X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- src/initscripts/system/unbound | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 2ef994e96..af9bcef73 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -197,8 +197,8 @@ write_forward_conf() { local insecure_zones="${INSECURE_ZONES}" - local enabled zone server servers remark - while IFS="," read -r enabled zone servers remark; do + local enabled zone server servers remark disable_dnssec rest + while IFS="," read -r enabled zone servers remark disable_dnssec rest; do # Line must be enabled. [ "${enabled}" = "on" ] || continue @@ -208,6 +208,11 @@ write_forward_conf() { *.local) insecure_zones="${insecure_zones} ${zone}" ;; + *) + if [ "${disable_dnssec}" = "on" ]; then + insecure_zones="${insecure_zones} ${zone}" + fi + ;; esac # Reverse-lookup zones must be stubs