Added option to download dh parameters

This commit is contained in:
redfast00 2016-10-04 11:21:06 +02:00
parent 8f09ee9afd
commit 8c880f9093
No known key found for this signature in database
GPG key ID: B7DD106EAC545F95

View file

@ -715,9 +715,14 @@ confOpenVPN() {
# Build the server
${SUDOE} ./build-key-server --batch $SERVER_NAME
if (whiptail --backtitle "Setup OpenVPN" --title "Diffie-Hellman Parameters" --yesno "Generating Diffie-Hellman might take a long time on a Raspberry Pi. Do you want to download them?" $r $c)
then
# Downloading parameters
${SUDOE} curl "https://2ton.com.au/dhparam/${ENCRYPT}" -o "${KEY_DIR}/dh${KEY_SIZE}.pem"
else
# Generate Diffie-Hellman key exchange
${SUDOE} ./build-dh
fi
# Generate static HMAC key to defend against DDoS
${SUDOE} openvpn --genkey --secret keys/ta.key