Merge 1a6a619f75
into e2d4990ae1
This commit is contained in:
commit
1c67ccf4df
1 changed files with 6 additions and 0 deletions
6
openvpn-install.sh
Executable file → Normal file
6
openvpn-install.sh
Executable file → Normal file
|
@ -4,6 +4,8 @@
|
||||||
# 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
|
||||||
|
|
||||||
|
set EASYRSA_CERT_EXPIRE=3650
|
||||||
|
|
||||||
function isRoot() {
|
function isRoot() {
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
return 1
|
return 1
|
||||||
|
@ -815,6 +817,7 @@ group $NOGROUP
|
||||||
persist-key
|
persist-key
|
||||||
persist-tun
|
persist-tun
|
||||||
keepalive 10 120
|
keepalive 10 120
|
||||||
|
log-append /var/log/openvpn/openvpn.log
|
||||||
topology subnet
|
topology subnet
|
||||||
server 10.8.0.0 255.255.255.0
|
server 10.8.0.0 255.255.255.0
|
||||||
ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf
|
ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf
|
||||||
|
@ -1220,6 +1223,9 @@ function revokeClient() {
|
||||||
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
|
sed -i "/^$CLIENT,.*/d" /etc/openvpn/ipp.txt
|
||||||
cp /etc/openvpn/easy-rsa/pki/index.txt{,.bk}
|
cp /etc/openvpn/easy-rsa/pki/index.txt{,.bk}
|
||||||
|
|
||||||
|
PATTERN="CN=$CLIENT$"
|
||||||
|
sed -i "/$PATTERN/d" /etc/openvpn/easy-rsa/pki/index.txt
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Certificate for client $CLIENT revoked."
|
echo "Certificate for client $CLIENT revoked."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue