mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-07-12 17:34:22 +02:00
Update openvpn-install.sh
Add variables to set expiration of CA certificate and client certificates
This commit is contained in:
parent
4553dd9c21
commit
33c25977a2
@ -4,6 +4,15 @@
|
|||||||
# Secure OpenVPN server installer for Debian, Ubuntu, CentOS, Amazon Linux 2, Fedora, Oracle Linux 8, Arch Linux, Rocky Linux and AlmaLinux.
|
# Secure OpenVPN server installer for Debian, Ubuntu, CentOS, Amazon Linux 2, Fedora, Oracle Linux 8, Arch Linux, Rocky Linux and AlmaLinux.
|
||||||
# https://github.com/angristan/openvpn-install
|
# https://github.com/angristan/openvpn-install
|
||||||
|
|
||||||
|
# Certificate expiration
|
||||||
|
|
||||||
|
# Default settings
|
||||||
|
# CA_EXPIRE=3650
|
||||||
|
# CERT_EXPIRE=825
|
||||||
|
|
||||||
|
CA_EXPIRE=7300
|
||||||
|
CERT_EXPIRE=7300
|
||||||
|
|
||||||
function isRoot() {
|
function isRoot() {
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
return 1
|
return 1
|
||||||
@ -726,6 +735,8 @@ function installOpenVPN() {
|
|||||||
echo "$SERVER_NAME" >SERVER_NAME_GENERATED
|
echo "$SERVER_NAME" >SERVER_NAME_GENERATED
|
||||||
|
|
||||||
echo "set_var EASYRSA_REQ_CN $SERVER_CN" >>vars
|
echo "set_var EASYRSA_REQ_CN $SERVER_CN" >>vars
|
||||||
|
echo "set_var EASYRSA_CA_EXPIRE $CA_EXPIRE" >>vars
|
||||||
|
echo "set_var EASYRSA_CERT_EXPIRE $CERT_EXPIRE" >>vars
|
||||||
|
|
||||||
# Create the PKI, set up the CA, the DH params and the server certificate
|
# Create the PKI, set up the CA, the DH params and the server certificate
|
||||||
./easyrsa init-pki
|
./easyrsa init-pki
|
||||||
|
Loading…
x
Reference in New Issue
Block a user