From 37fba62c29060b46cd9ac3a62cac19d6a55d5aad Mon Sep 17 00:00:00 2001 From: Filip Strajnar Date: Fri, 21 Jun 2024 17:22:50 +0200 Subject: [PATCH] Added client-to-client option. --- openvpn-install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/openvpn-install.sh b/openvpn-install.sh index 3d6d7f2..458a95e 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -322,6 +322,15 @@ function installQuestions() { firewall-cmd --permanent --add-port "${PORT}"/"${PROTOCOL}" fi fi + + echo "" + echo "Option client-to-client allows clients to \"see\" eachother." + echo "Would you like to enable this option?" + SUGGESTION=y + until [[ $CLIENT_TO_CLIENT_OPTION =~ (y|n) ]]; do + read -rp "Enable client-to-client? [y/n]: " -e -i $SUGGESTION CLIENT_TO_CLIENT_OPTION + done + echo "" echo "What DNS resolvers do you want to use with the VPN?" echo " 1) Current system resolvers (from /etc/resolv.conf)" @@ -787,6 +796,10 @@ function installOpenVPN() { echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf fi + if [[ $CLIENT_TO_CLIENT_OPTION == "y" ]]; then + echo "client-to-client" >>/etc/openvpn/server.conf + fi + echo "dev tun user nobody group $NOGROUP