diff --git a/README.md b/README.md index 5f002c1..b8bd758 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ export PASS="1" - Block DNS leaks on Windows 10 - Randomised server certificate name - Choice to protect clients with a password (private key encryption) -- Option to allow multiple devices to use the same client profile simultaneously +- Option to allow multiple devices to use the same client profile simultaneously (disables persistent IP addresses) - Many other little things! ## Compatibility diff --git a/openvpn-install.sh b/openvpn-install.sh index 2ed9da2..1d86962 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -636,6 +636,7 @@ function installQuestions() { done log_menu "" log_prompt "Do you want to allow a single .ovpn profile to be used on multiple devices simultaneously?" + log_prompt "Note: Enabling this disables persistent IP addresses for clients." until [[ $MULTI_CLIENT =~ (y|n) ]]; do read -rp "Allow multiple devices per client? [y/n]: " -e -i n MULTI_CLIENT done @@ -1124,8 +1125,12 @@ persist-key persist-tun keepalive 10 120 topology subnet -server 10.8.0.0 255.255.255.0 -ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf +server 10.8.0.0 255.255.255.0" >>/etc/openvpn/server.conf + + # ifconfig-pool-persist is incompatible with duplicate-cn + if [[ $MULTI_CLIENT != "y" ]]; then + echo "ifconfig-pool-persist ipp.txt" >>/etc/openvpn/server.conf + fi # DNS resolvers case $DNS in