Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the duplicate-cn option. This will allow multiple clients using the same certificate or username to connect concurrently. The default value is set to n. #1247

Closed
wants to merge 8 commits into from
13 changes: 12 additions & 1 deletion openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,13 @@ function installQuestions() {
fi
done
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."
until [[ $COMPRESSION_ENABLED =~ (y|n) ]]; do
read -rp"Enable compression? [y/n]: " -e -i n COMPRESSION_ENABLED
Expand All @@ -408,7 +415,7 @@ function installQuestions() {
echo " 2) LZ4"
echo " 3) LZ0"
until [[ $COMPRESSION_CHOICE =~ ^[1-3]$ ]]; do
read -rp"Compression algorithm [1-3]: " -e -i 1 COMPRESSION_CHOICE
read -rp"Compression algorithm [1-3]: " -e -i 1 COMPRESSION_CHOICE
done
case $COMPRESSION_CHOICE in
1)
Expand Down Expand Up @@ -809,6 +816,10 @@ function installOpenVPN() {
echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf
fi

if [[ $MULTI_CLIENT == "y" ]]; then
echo "duplicate-cn" >>/etc/openvpn/server.conf
fi

echo "dev tun
user nobody
group $NOGROUP
Expand Down