From 053c0d9d214ed9e9de90940d9b3e2291cb9323e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Cola=C3=A7o?= Date: Wed, 18 Oct 2017 20:58:20 +0200 Subject: [PATCH 1/4] Fix Clients only in one line (#384) * fixed pivpn clients text display * #Oops * clients in only 1 line fixed --- scripts/clientStat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/clientStat.sh b/scripts/clientStat.sh index 6a5ff97..c332fe1 100644 --- a/scripts/clientStat.sh +++ b/scripts/clientStat.sh @@ -17,17 +17,17 @@ printf ": NOTE : The output below is NOT real-time!\n" printf ": : It may be off by a few minutes.\n" printf "\n" printf "\e[1m::: Client Status List :::\e[0m\n" -printf "\t\t\t\t\t\t\tBytes\t\tBytes\t\n" -printf "\e[4mName\e[0m\t\t\e[4mRemote IP\e[0m\t\t\e[4mVirtual IP\e[0m\t\e[4mReceived\e[0m\t\e[4mSent\e[0m\t\t\e[4mConnected Since\e[0m \n" +printf "\t\t\t\t\t\t\t\tBytes\t\tBytes\t\n" +printf "\e[4mName\e[0m\t\t\t\e[4mRemote IP\e[0m\t\t\e[4mVirtual IP\e[0m\t\e[4mReceived\e[0m\t\e[4mSent\e[0m\t\t\e[4mConnected Since\e[0m \n" if grep -q "^CLIENT_LIST" "${STATUS_LOG}"; then if [ -n $(type -t numfmt) ]; then while read -r line; do read -r -a array <<< $line [[ ${array[0]} = CLIENT_LIST ]] || continue - printf "%s\t\t%s\t%s\t%s\t\t%s\t\t%s %s %s - %s" ${array[1]} ${array[2]} ${array[3]} $(hr ${array[4]}) $(hr ${array[5]}) ${array[7]} ${array[8]} ${array[10]} ${array[9]} + printf "%s\t\t%s\t%s\t%s\t\t%s\t\t%s %s %s - %s\n" ${array[1]} ${array[2]} ${array[3]} $(hr ${array[4]}) $(hr ${array[5]}) ${array[7]} ${array[8]} ${array[10]} ${array[9]} done <$STATUS_LOG else - awk -F' ' -v s='CLIENT_LIST' '$1 == s {print $2"\t\t"$3"\t"$4"\t"$5"\t\t"$6"\t\t"$8" "$9" "$11" - "$10}' ${STATUS_LOG} + awk -F' ' -v s='CLIENT_LIST' '$1 == s {print $2"\t\t"$3"\t"$4"\t"$5"\t\t"$6"\t\t"$8" "$9" "$11" - "$10"\n"}' ${STATUS_LOG} fi else printf "\nNo Clients Connected!\n" From 7ed7e4652ebe322e51e85a0582907e83eea0d103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Cola=C3=A7o?= Date: Fri, 20 Oct 2017 17:00:23 +0200 Subject: [PATCH 2/4] Added info regarding Raspbian Stretch added info about support for raspbian Strech, and changed the preference from Jessie to Stretch. Edited and merged directly since it is a minor edit. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 332b80b..f63e910 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ into a VPN server using the free, open-source [OpenVPN](https://openvpn.net) sof Have you been looking for a good guide or tutorial for installing openvpn on a raspberry pi or ubuntu based server? Run this script and you don't need a guide or tutorial, this will do it all for you, in a fraction of the time and with hardened security settings in place by default. The master branch of this script installs and configures OpenVPN on Raspbian -Jessie and has been tested on Ubuntu 14.04 running from an Amazon AWS image. Personally, I'd recommend using the Jessie Lite image on a raspberry pi in your home so you can VPN into your home from unsecure remote locations and safely use the internet. However, the scripts do try to detect different distributions and make adjustments accordingly. They should work on the majority of Ubuntu and Debian based distributions including those using UFW by default instead of raw iptables. +Jessie, Stretch, Devuan and has been tested on Ubuntu 14.04 and 16.04 running from an Amazon AWS image. Personally, I'd recommend using the Stretch or Jessie Lite image on a raspberry pi in your home so you can VPN into your home from unsecure remote locations and safely use the internet. However, the scripts do try to detect different distributions and make adjustments accordingly. They should work on the majority of Ubuntu and Debian based distributions including those using UFW by default instead of raw iptables. This scripts primary mission in life is to allow a user to have a home VPN for as cost effective as possible and without being a technical wizard. Hence the design of pivpn to work on a Raspberry Pi ($35) and then one command installer. Followed by easy management of the VPN thereafter with the 'pivpn' command. That being said... @@ -25,7 +25,7 @@ a Raspberry Pi Model B or later with an ethernet port, an SD or microSD card (depending on the model) with Raspbian installed, a power adapter appropriate to the power needs of your model, and an ethernet cable or wifi adapter to connect your Pi to your router or gateway. It is recommended that you use a fresh image of Raspbian -Jessie Lite from https://raspberrypi.org/downloads, but if you don't, +Stretch Lite from https://raspberrypi.org/downloads, but if you don't, be sure to make a backup image of your existing installation before proceeding. You should also setup your Pi with a static IP address (see either source 1 or 2 at the bottom of this Readme) but it is not required as the script can do this for you. From 455b754c41927840368725021169db2e9d7fb255 Mon Sep 17 00:00:00 2001 From: "Tuan M. Dang" Date: Sun, 19 Nov 2017 21:36:21 +0700 Subject: [PATCH 3/4] Issue-171: Error using iOS OpenVPN As @fyellin There is some chatter on other groups that some OpenVPN implementations cannot handle client keys that are encrypted with RSA. If the client key is encrypted, we might re-encrypting the current client key using 3DES. This commit will convert user client key to 3DES in command `pivpn -a` P/S: All credits to @fyellin. Many thanks to him. --- scripts/makeOVPN.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index d9101f3..31dbb23 100644 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -121,6 +121,17 @@ function keyPASS() { expect eof EOF + #Convert key to des3 + KEY_FILE="pki/private/${NAME}${KEY}" + expect << EOF + set timeout -1 + spawn openssl rsa -in ${KEY_FILE} -des3 -out ${KEY_FILE} + expect "Enter pass phrase" { send "${PASSWD}\r" } + expect "Enter PEM pass phrase" { send "${PASSWD}\r" } + expect "Verifying - Enter PEM pass phrase" { send "${PASSWD}\r" } + expect eof +EOF + cd pki || exit } From 4e814fc5769b7dc3230086f63259bf2cba11b463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Cola=C3=A7o?= Date: Tue, 19 Dec 2017 23:29:47 +0000 Subject: [PATCH 4/4] Updated Issue Template Noticed the lack of information from PiVPN users when opening issues, some of that information is quite useful to troubleshoot, so I have changed the issue template to provide us with more information than the previous one! and added a few comments in order to to try to raise awareness for users that they need to provide us with accurate information, not just a simple "It doesn't work!" Thanks --- ISSUE_TEMPLATE.md | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index b214268..b4261de 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,21 +1,53 @@ - - + + + + + + + # PiVPN Issue Template + + +## Issue + + +## Have you searched for similar issues and solutions? + (yes/no / which issues?) + + ## Console output of `curl install.pivpn.io | bash` ``` - + Output Here ``` ## Console output of `pivpn add` or `pivpn add nopass` ``` - + Output Here ``` ## Console output of `pivpn debug` ``` + Output Here +``` + +## Console Output of `sudo iptables -t nat -S` +``` + Output Here +``` + +## Console Output of `sudo iptables -S` +``` + Output Here +``` + +## output of `sudo netstat -uanp | grep openvpn` ``` + Output Here +``` + +## Have you taken any steps towards solving your issue? + which? + - -## Issue