mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-05-09 18:28:23 +02:00
Added duplicate-cn
Added duplicate-cn for connecting multiple clients using same .ovpn
This commit is contained in:
parent
e2d4990ae1
commit
f0629675d5
@ -277,7 +277,7 @@ function installQuestions() {
|
|||||||
if [[ $APPROVE_IP =~ n ]]; then
|
if [[ $APPROVE_IP =~ n ]]; then
|
||||||
read -rp "IP address: " -e -i "$IP" IP
|
read -rp "IP address: " -e -i "$IP" IP
|
||||||
fi
|
fi
|
||||||
# If $IP is a private IP address, the server must be behind NAT
|
# If $IP is a private IP address, the server must be behind NAT
|
||||||
if echo "$IP" | grep -qE '^(10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168)'; then
|
if echo "$IP" | grep -qE '^(10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168)'; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "It seems this server is behind NAT. What is its public IPv4 address or hostname?"
|
echo "It seems this server is behind NAT. What is its public IPv4 address or hostname?"
|
||||||
@ -398,6 +398,13 @@ function installQuestions() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
|
read -rp "Do you want the same client .ovpn file to connect multiple clients? (This will add 'duplicate-cn' in the server.conf) [y/n]: " -e -i n MULTI_CLIENT_CHOICE
|
||||||
|
if [[ $MULTI_CLIENT_CHOICE =~ ^[Yy]$ ]]; then
|
||||||
|
MULTI_CLIENT="y"
|
||||||
|
else
|
||||||
|
MULTI_CLIENT="n"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
echo "Do you want to use compression? It is not recommended since the VORACLE attack makes use of it."
|
echo "Do you want to use compression? It is not recommended since the VORACLE attack makes use of it."
|
||||||
until [[ $COMPRESSION_ENABLED =~ (y|n) ]]; do
|
until [[ $COMPRESSION_ENABLED =~ (y|n) ]]; do
|
||||||
read -rp"Enable compression? [y/n]: " -e -i n COMPRESSION_ENABLED
|
read -rp"Enable compression? [y/n]: " -e -i n COMPRESSION_ENABLED
|
||||||
@ -809,6 +816,10 @@ function installOpenVPN() {
|
|||||||
echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf
|
echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $MULTI_CLIENT == "y" ]]; then
|
||||||
|
echo "duplicate-cn" >>/etc/openvpn/server.conf
|
||||||
|
fi
|
||||||
|
|
||||||
echo "dev tun
|
echo "dev tun
|
||||||
user nobody
|
user nobody
|
||||||
group $NOGROUP
|
group $NOGROUP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user