mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Merge branch 'develop'
This commit is contained in:
commit
dca76207a1
1 changed files with 3 additions and 2 deletions
|
@ -475,7 +475,6 @@ if [ "$OPENVPN" = "yes" ]; then
|
||||||
# openvpn --genkey --secret static.key
|
# openvpn --genkey --secret static.key
|
||||||
#fi
|
#fi
|
||||||
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ]; then
|
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ]; then
|
||||||
openssl dhparam -out /etc/openvpn/server/dh2048.pem 2048
|
|
||||||
wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz
|
wget -O /tmp/EasyRSA-unix-v${EASYRSA_VERSION}.tgz https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v${EASYRSA_VERSION}.tgz
|
||||||
cd /tmp
|
cd /tmp
|
||||||
tar xzvf EasyRSA-unix-v${EASYRSA_VERSION}.tgz
|
tar xzvf EasyRSA-unix-v${EASYRSA_VERSION}.tgz
|
||||||
|
@ -509,7 +508,6 @@ if [ "$OPENVPN" = "yes" ]; then
|
||||||
mv /etc/openvpn/client/client.key /etc/openvpn/ca/pki/private/openmptcprouter.key
|
mv /etc/openvpn/client/client.key /etc/openvpn/ca/pki/private/openmptcprouter.key
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/etc/openvpn/ca/pki/issued/server.crt" ]; then
|
if [ ! -f "/etc/openvpn/ca/pki/issued/server.crt" ]; then
|
||||||
openssl dhparam -out /etc/openvpn/server/dh2048.pem 2048
|
|
||||||
if [ ! -d /etc/openvpn/ca ]; then
|
if [ ! -d /etc/openvpn/ca ]; then
|
||||||
make-cadir /etc/openvpn/ca
|
make-cadir /etc/openvpn/ca
|
||||||
fi
|
fi
|
||||||
|
@ -524,6 +522,9 @@ if [ "$OPENVPN" = "yes" ]; then
|
||||||
mv /etc/openvpn/ca/pki/issued/client.crt /etc/openvpn/ca/pki/issued/openmptcprouter.crt
|
mv /etc/openvpn/ca/pki/issued/client.crt /etc/openvpn/ca/pki/issued/openmptcprouter.crt
|
||||||
mv /etc/openvpn/ca/pki/private/client.key /etc/openvpn/ca/pki/private/openmptcprouter.key
|
mv /etc/openvpn/ca/pki/private/client.key /etc/openvpn/ca/pki/private/openmptcprouter.key
|
||||||
fi
|
fi
|
||||||
|
if [ ! -f "/etc/openvpn/server/dh2048.pem" ]; then
|
||||||
|
openssl dhparam -out /etc/openvpn/server/dh2048.pem 2048
|
||||||
|
fi
|
||||||
wget -O /etc/openvpn/tun0.conf https://www.openmptcprouter.com/${VPSPATH}/openvpn-tun0.conf
|
wget -O /etc/openvpn/tun0.conf https://www.openmptcprouter.com/${VPSPATH}/openvpn-tun0.conf
|
||||||
wget -O /etc/openvpn/tun1.conf https://www.openmptcprouter.com/${VPSPATH}/openvpn-tun1.conf
|
wget -O /etc/openvpn/tun1.conf https://www.openmptcprouter.com/${VPSPATH}/openvpn-tun1.conf
|
||||||
systemctl enable openvpn@tun0.service
|
systemctl enable openvpn@tun0.service
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue