From 44105eb06068ef95ff3217924ee615e8757f7516 Mon Sep 17 00:00:00 2001 From: Henry N Date: Sat, 28 Mar 2020 15:40:51 +0100 Subject: [PATCH 1/6] Fix systemd unit issue on Debian 9 (#585) On Debian 9 the copy of unit file `/etc/systemd/system/openvpn@.service` has no effect, see #583. Same problem as #129 and #378, unit can not start on OpenVZ. It must execute `systemctl enable` before `systemctl restart`. So the new link to `/etc/systemd/system/openvpn@.service` was created before `systemctl restart`. Fix https://github.com/angristan/openvpn-install/issues/583 --- openvpn-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 078d200..d152fb6 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -887,8 +887,8 @@ verb 3" >> /etc/openvpn/server.conf fi systemctl daemon-reload - systemctl restart openvpn-server@server systemctl enable openvpn-server@server + systemctl restart openvpn-server@server elif [[ "$OS" == "ubuntu" ]] && [[ "$VERSION_ID" == "16.04" ]]; then # On Ubuntu 16.04, we use the package from the OpenVPN repo # This package uses a sysvinit service @@ -904,8 +904,8 @@ verb 3" >> /etc/openvpn/server.conf sed -i 's|/etc/openvpn/server|/etc/openvpn|' /etc/systemd/system/openvpn\@.service systemctl daemon-reload - systemctl restart openvpn@server systemctl enable openvpn@server + systemctl restart openvpn@server fi if [[ $DNS == 2 ]];then From 7ed9cac8d78e630b0f68c4446074d19725e1c4f9 Mon Sep 17 00:00:00 2001 From: randomshell <43271778+randomshell@users.noreply.github.com> Date: Tue, 31 Mar 2020 21:05:44 +0000 Subject: [PATCH 2/6] Change Adguard DNS to Anycast (#596) See map at https://adguard.com/en/adguard-dns/overview.html --- openvpn-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index d152fb6..edb703e 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -293,8 +293,8 @@ function installQuestions () { echo " 8) OpenDNS (Anycast: worldwide)" echo " 9) Google (Anycast: worldwide)" echo " 10) Yandex Basic (Russia)" - echo " 11) AdGuard DNS (Russia)" - echo " 12) NextDNS (Worldwide)" + echo " 11) AdGuard DNS (Anycast: worldwide)" + echo " 12) NextDNS (Anycast: worldwide)" echo " 13) Custom" until [[ "$DNS" =~ ^[0-9]+$ ]] && [ "$DNS" -ge 1 ] && [ "$DNS" -le 13 ]; do read -rp "DNS [1-12]: " -e -i 3 DNS From e123635e7ca50792523ea034bf2ed19749aeb690 Mon Sep 17 00:00:00 2001 From: Henry N Date: Thu, 2 Apr 2020 16:30:50 +0200 Subject: [PATCH 3/6] Add comments to some DNS options in code (#598) --- openvpn-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index edb703e..a9f1a03 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -745,7 +745,7 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf # DNS resolvers case $DNS in - 1) + 1) # Current system resolvers # Locate the proper resolv.conf # Needed for systems running systemd-resolved if grep -q "127.0.0.53" "/etc/resolv.conf"; then @@ -758,7 +758,7 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf done ;; - 2) + 2) # Self-hosted DNS resolver (Unbound) echo 'push "dhcp-option DNS 10.8.0.1"' >> /etc/openvpn/server.conf ;; 3) # Cloudflare From d958c15909270b3cc5f0c6bd1b5e6fd0182135b0 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Fri, 3 Apr 2020 11:13:57 +0200 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A4=A6=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca3cdf7..b6e90f0 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ When OpenVPN is installed, you can run the script again, and you will get the ch In your home directory, you will have `.ovpn` files. These are the client configuration files. Download them from your server and connect using your favorite OpenVPN client. -If you have any question, head to the [FAQ](#faq) first. +If you have any question, head to the [FAQ](#faq) and the [Wiki](https://github.com/angristan/openvpn-install/wiki/FAQ) first. Please read everything before opening an issue. + +**PLEASE do net send me emails or private messages asking for help.** The only place to get help is the issues. Other people may be able to help and in the future, other users may also run into the same issue as you. My time is not available for free just for you, you're not special. ### Headless install From d31efe9e7b6483325cb6aa7976db2e7f2e28b403 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Sat, 4 Apr 2020 11:54:17 +0200 Subject: [PATCH 5/6] Move FAQ from wiki to git to allow contributions (#611) Signed-off-by: Stanislas Lange --- .github/ISSUE_TEMPLATE.md | 2 +- FAQ.md | 47 +++++++++++++++++++++++++++++++++++++++ README.md | 6 ++--- 3 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 FAQ.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 617414b..36bc569 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -7,7 +7,7 @@ Before opening an issue, please make sure: - Your issue is about the script, NOT OpenVPN itself - ⚠ PLEASE Post your OpenVPN version and OS for both the server and the client if needed -FYI, you can excute the script with `bash -x openvpn-install.sh` to enable debug mode. +FYI, you can execute the script with `bash -x openvpn-install.sh` to enable debug mode. You can format your comments with Markdown: https://guides.github.com/features/mastering-markdown/ ---> diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..895c865 --- /dev/null +++ b/FAQ.md @@ -0,0 +1,47 @@ +# FAQ + +**Q:** The script has been updated since I installed OpenVPN. How do I update? + +**A:** You can't. Managing updates and new features from the script would require way too much work. Your only solution is to uninstall OpenVPN and reinstall with the updated script. + +You can, of course, it's even recommended, update the `openvpn` package with your package manager. + +--- + +**Q:** How do I check for DNS leaks? + +**A:** Go to [dnsleaktest.com](https://dnsleaktest.com/) or [ipleak.net](https://ipleak.net/) with your browser. Only your server's IP should show up. + +--- + +**Q:** Can I use an OpenVPN 2.3 client? + +**A:** Yes. I really recommend using an up-to-date client, but if you really need it, choose the following options: + +- No compression or LZ0 +- RSA certificate +- DH Key +- AES CBC +- tls-auth + +If your client is <2.3.3, remove `tls-version-min 1.2` from your `/etc/openvpn/server.conf` and `.ovpn` files. + +--- + +**Q:** IPv6 is not working on my Hetzner VM + +**A:** This an issue on their side. See https://angristan.xyz/fix-ipv6-hetzner-cloud/ + +--- + +**Q:** DNS is not working on my Linux client + +**A:** Make sure the `resolvconf` package is installed. If it does not solve the issue, look at https://wiki.archlinux.org/index.php/OpenVPN#Update_systemd-resolved_script + +--- + +**Q:** How to setup openVPN in a LXC container? (f.e. Proxmox) + +**A:** See https://github.com/Nyr/openvpn-install/wiki/How-to-setup-openVPN-in-a-LXC-container-(f.e.-Proxmox) + +--- diff --git a/README.md b/README.md index b6e90f0..f36e290 100644 --- a/README.md +++ b/README.md @@ -136,9 +136,7 @@ Since 2016, the two scripts have diverged and are not alike anymore, especially ## FAQ -**LOOK AT THE [WIKI](https://github.com/angristan/openvpn-install/wiki/FAQ) FOR MORE INFORMATION. PLEASE READ BOTH BEFORE OPENING AN ISSUE.** - -**PLEASE do net send me emails or private messages asking for help.** The only place to get help is the issues. Other people may be able to help and in the future, other users may also run into the same issue as you. +More Q&A in [FAQ.md](FAQ.md). **Q:** Which provider do you recommend? @@ -174,6 +172,8 @@ Since 2016, the two scripts have diverged and are not alike anymore, especially --- +More Q&A in [FAQ.md](FAQ.md). + ## One-stop solutions for public cloud Solutions that provision a ready to use OpenVPN server based on this script in one go are available for: From 7e7a494f595356625deda506fab65dc8a7520b59 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Sat, 4 Apr 2020 11:55:08 +0200 Subject: [PATCH 6/6] Remove wiki link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f36e290..ecabc80 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ When OpenVPN is installed, you can run the script again, and you will get the ch In your home directory, you will have `.ovpn` files. These are the client configuration files. Download them from your server and connect using your favorite OpenVPN client. -If you have any question, head to the [FAQ](#faq) and the [Wiki](https://github.com/angristan/openvpn-install/wiki/FAQ) first. Please read everything before opening an issue. +If you have any question, head to the [FAQ](#faq) first. Please read everything before opening an issue. **PLEASE do net send me emails or private messages asking for help.** The only place to get help is the issues. Other people may be able to help and in the future, other users may also run into the same issue as you. My time is not available for free just for you, you're not special.