]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commit
OpenVPN: Add tls-version-min for TLSv1.2
authorErik Kapfer <ummeegge@ipfire.org>
Sat, 15 Aug 2020 15:08:45 +0000 (17:08 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Aug 2020 10:09:15 +0000 (10:09 +0000)
commit942446b553235db212d1dfda63bd9ab52eef4c29
tree95a1cffb3a6a25aef493cf9bc9cf2ab1c83b01d7
parent0d1054abc955eb6a0b772fd089d23f8b4af31f9a
OpenVPN: Add tls-version-min for TLSv1.2

ovpnmain.cgi delivers now 'tls-version-min 1.2' for Roadwarrior and N2N.
Since the server needs it only on server side, this patch do not includes it for Roadwarrior clients.
N2N do not uses push options therefor this directive will be included on both sides.

To integrate the new directive into actual working OpenVPN server environment, the following commands
should be executed via update.sh.

Code block start:

if test -f "/var/ipfire/ovpn/server.conf"; then
# Add tls-version-minimum to OpenVPN server if not already there
if ! grep -q '^tls-version-min' /var/ipfire/ovpn/server.conf > /dev/null 2>&1; then
# Stop server before append the line
/usr/local/bin/openvpnctrl -k
# Append new directive
echo >> "tls-version-min 1.2" /var/ipfire/ovpn/server.conf
# Make sure server.conf have the correct permissions to prevent such
# --> https://community.ipfire.org/t/unable-to-start-the-openvpn-server/2465/54?u=ummeegge
# case
chown nobody:nobody /var/ipfire/ovpn/server.conf
# Start server again
/usr/local/bin/openvpnctrl -s
fi
fi

Code block end

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi