mirror of
https://github.com/Nyr/openvpn-install.git
synced 2025-02-17 14:03:13 +03:00
Merge c0c0b189287ba23c7787a08fa147b52aafefd227 into 6936231d86f67f99e1777600ad06e052752447d5
This commit is contained in:
commit
40f2553a1f
@ -246,7 +246,7 @@ LimitNPROC=infinity" > /etc/systemd/system/openvpn-server@server.service.d/disab
|
||||
mkdir -p /etc/openvpn/server/easy-rsa/
|
||||
{ wget -qO- "$easy_rsa_url" 2>/dev/null || curl -sL "$easy_rsa_url" ; } | tar xz -C /etc/openvpn/server/easy-rsa/ --strip-components 1
|
||||
chown -R root:root /etc/openvpn/server/easy-rsa/
|
||||
cd /etc/openvpn/server/easy-rsa/
|
||||
cd /etc/openvpn/server/easy-rsa/ || exit
|
||||
# Create the PKI, set up the CA and the server and client certificates
|
||||
./easyrsa --batch init-pki
|
||||
./easyrsa --batch build-ca nopass
|
||||
@ -464,7 +464,7 @@ else
|
||||
read -p "Name: " unsanitized_client
|
||||
client=$(sed 's/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-]/_/g' <<< "$unsanitized_client")
|
||||
done
|
||||
cd /etc/openvpn/server/easy-rsa/
|
||||
cd /etc/openvpn/server/easy-rsa/ || exit
|
||||
./easyrsa --batch --days=3650 build-client-full "$client" nopass
|
||||
# Generates the custom client.ovpn
|
||||
new_client
|
||||
@ -497,7 +497,7 @@ else
|
||||
read -p "Confirm $client revocation? [y/N]: " revoke
|
||||
done
|
||||
if [[ "$revoke" =~ ^[yY]$ ]]; then
|
||||
cd /etc/openvpn/server/easy-rsa/
|
||||
cd /etc/openvpn/server/easy-rsa/ || exit
|
||||
./easyrsa --batch revoke "$client"
|
||||
./easyrsa --batch --days=3650 gen-crl
|
||||
rm -f /etc/openvpn/server/crl.pem
|
||||
|
Loading…
x
Reference in New Issue
Block a user