Update IKEv2 script

- Save client configuration to home folder
This commit is contained in:
hwdsl2 2020-05-17 18:09:40 -05:00
parent 09c68fda01
commit 0a0607feb9

View File

@ -293,7 +293,7 @@ certutil -z <(head -c 1024 /dev/urandom) \
bigecho "Exporting CA certificate..." bigecho "Exporting CA certificate..."
certutil -L -d sql:/etc/ipsec.d -n "IKEv2 VPN CA" -a -o "vpnca-$SYS_DT.cer" certutil -L -d sql:/etc/ipsec.d -n "IKEv2 VPN CA" -a -o ~/"vpnca-$SYS_DT.cer"
bigecho "Exporting .p12 file..." bigecho "Exporting .p12 file..."
@ -304,7 +304,7 @@ When importing into an iOS or macOS device, this password cannot be empty.
EOF EOF
pk12util -o "vpnclient-$SYS_DT.p12" -n "vpnclient" -d sql:/etc/ipsec.d pk12util -d sql:/etc/ipsec.d -n "vpnclient" -o ~/"vpnclient-$SYS_DT.p12"
bigecho "Restarting IPsec service..." bigecho "Restarting IPsec service..."
@ -313,19 +313,23 @@ service ipsec restart
cat <<EOF cat <<EOF
================================================= =======================================================
IKEv2 VPN setup is now complete! IKEv2 VPN setup is now complete!
Files exported to the current folder: Client configuration is available at:
vpnclient-$SYS_DT.p12 EOF
vpnca-$SYS_DT.cer (for iOS clients)
printf '%s\n' ~/"vpnclient-$SYS_DT.p12"
printf '%s\n' ~/"vpnca-$SYS_DT.cer (for iOS clients)"
cat <<EOF
Next steps: Configure IKEv2 VPN clients. See: Next steps: Configure IKEv2 VPN clients. See:
https://git.io/ikev2clients https://git.io/ikev2clients
================================================= =======================================================
EOF EOF