From patchwork Tue Dec 13 15:47:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 6301 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4NWjZ85gswz3wfW for ; Tue, 13 Dec 2022 15:48:00 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NWjZ7219YzQS; Tue, 13 Dec 2022 15:47:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NWjZ70ngdz2yF3; Tue, 13 Dec 2022 15:47:59 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4NWjZ50TCDz2xSf for ; Tue, 13 Dec 2022 15:47:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4NWjZ32qT4zQS for ; Tue, 13 Dec 2022 15:47:54 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1670946476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBZ2/H6Hjfbm5m9gcnnTY995SSPG0562ozckqss0zJ4=; b=d2GYkTV84ZR/UNC5wFFHYA7OLgReXw75Et7F13i76AsYK3IkUIlRXMpwmRcFFHDLM9wzRU jVHxBEGbOL6BWDCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1670946476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBZ2/H6Hjfbm5m9gcnnTY995SSPG0562ozckqss0zJ4=; b=envkKkGmdtBV4bA/haIwUAa4hOo82l7rra/of9iTPTn5cADEJypXtumlPIs9s1HeDgXEha hIYJINUS8N8NgRs1nEbvc8mUV3p8+LYMc6cOEf2P1Tunvq3pwQA1qpULQnGC4+AvU/+vI1 RFxSVTMPaH/hlIdyRunFipcng7GYEuQMjn+NREsZoy9b605OTpG33QwTiPm2Y75NBoAsvd pIRyCTTlgNMl9XLYa69Q+5VWEPl1Jd4b13dCN/WPDr2EA4Q8ztpFzmVn+xys0ABhcyImvg z93X8691BUv5ZbphsZSXQAPMJ4A33Zd8FHxIPPooixy6DaKjCBfXpK4k6/NFcQ== Message-ID: Date: Tue, 13 Dec 2022 15:47:49 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] backup(.pl): Replace OpenVPN DH parameter with ffdhe4096 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 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" This ensures restoring a backup won't silently bring back an insecure Diffie-Hellman parameter (which could also not be inspected through the web interface anymore). Reported-by: Michael Tremer Signed-off-by: Peter Müller --- config/backup/backup.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 6fd9e45bb..520d9315d 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -187,6 +187,15 @@ restore_backup() { # Update OpenVPN CRL /etc/fcron.daily/openvpn-crl-updater + # Replace previously used OpenVPN Diffie-Hellman parameter by ffdhe4096 + if [ -f /var/ipfire/ovpn/server.conf ]; then + sed -i 's|/var/ipfire/ovpn/ca/dh1024.pem|/etc/ssl/ffdhe4096.pem|' /var/ipfire/ovpn/server.conf + fi + + if [ -f "/var/ipfire/ovpn/n2nconf/*/*.conf" ]; then + sed -i 's|/var/ipfire/ovpn/ca/dh1024.pem|/etc/ssl/ffdhe4096.pem|' /var/ipfire/ovpn/n2nconf/*/*.conf + fi + return 0 }