]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
backup(.pl): Replace OpenVPN DH parameter with ffdhe4096
authorPeter Müller <peter.mueller@ipfire.org>
Sat, 17 Dec 2022 14:46:32 +0000 (14:46 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 17 Dec 2022 14:46:32 +0000 (14:46 +0000)
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 <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
config/backup/backup.pl

index 6fd9e45bb1f5e4f517d52a82732236b1986ab7a7..96e794439fedfdb52362e62d6abf2e1052681b27 100644 (file)
@@ -184,6 +184,9 @@ restore_backup() {
        # move nobeeps if exist
        [ -e "/var/ipfire/ppp/nobeeps" ] && mv /var/ipfire/ppp/nobeeps /var/ipfire/red/nobeeps
 
+       # Replace previously used OpenVPN Diffie-Hellman parameter by ffdhe4096
+       sed -i 's|/var/ipfire/ovpn/ca/dh1024.pem|/etc/ssl/ffdhe4096.pem|' /var/ipfire/ovpn/server.conf /var/ipfire/ovpn/n2nconf/*/*.conf
+
        # Update OpenVPN CRL
        /etc/fcron.daily/openvpn-crl-updater