Added client-to-client option.

This commit is contained in:
Filip Strajnar 2024-06-21 17:22:50 +02:00
parent 75d0bdf605
commit 37fba62c29

View File

@ -322,6 +322,15 @@ function installQuestions() {
firewall-cmd --permanent --add-port "${PORT}"/"${PROTOCOL}" firewall-cmd --permanent --add-port "${PORT}"/"${PROTOCOL}"
fi fi
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 ""
echo "What DNS resolvers do you want to use with the VPN?" echo "What DNS resolvers do you want to use with the VPN?"
echo " 1) Current system resolvers (from /etc/resolv.conf)" echo " 1) Current system resolvers (from /etc/resolv.conf)"
@ -787,6 +796,10 @@ function installOpenVPN() {
echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf echo "proto ${PROTOCOL}6" >>/etc/openvpn/server.conf
fi fi
if [[ $CLIENT_TO_CLIENT_OPTION == "y" ]]; then
echo "client-to-client" >>/etc/openvpn/server.conf
fi
echo "dev tun echo "dev tun
user nobody user nobody
group $NOGROUP group $NOGROUP