mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-19 19:30:16 +00:00
Merge branch 'test' of https://github.com/pivpn/pivpn into test
merging in wg service reload/restart
This commit is contained in:
commit
983d43f791
9 changed files with 207 additions and 73 deletions
|
@ -28,9 +28,6 @@ dhcpcdFile="/etc/dhcpcd.conf"
|
|||
subnetClass="24"
|
||||
debianOvpnUserGroup="openvpn:openvpn"
|
||||
|
||||
# OpenVPN GPG fingerprint, you can look it up at https://keyserver.ubuntu.com (prepend '0x' before it)
|
||||
OPENVPN_KEY_ID="30EBF4E73CCE63EEE124DD278E6DA8B4E158C569"
|
||||
|
||||
######## PKG Vars ########
|
||||
PKG_MANAGER="apt-get"
|
||||
PKG_CACHE="/var/lib/apt/lists/"
|
||||
|
@ -51,9 +48,6 @@ INSTALLED_PACKAGES=()
|
|||
easyrsaVer="3.0.7"
|
||||
easyrsaRel="https://github.com/OpenVPN/easy-rsa/releases/download/v${easyrsaVer}/EasyRSA-${easyrsaVer}.tgz"
|
||||
|
||||
# Fallback url for the OpenVPN key
|
||||
OPENVPN_KEY_URL="https://swupdate.openvpn.net/repos/repo-public.gpg"
|
||||
|
||||
######## Undocumented Flags. Shhh ########
|
||||
runUnattended=false
|
||||
skipSpaceCheck=false
|
||||
|
@ -77,6 +71,9 @@ c=$(( c < 70 ? 70 : c ))
|
|||
# Override localization settings so the output is in English language.
|
||||
export LC_ALL=C
|
||||
|
||||
# Enable recursive globbing to find wireguard.ko in /lib/modules.
|
||||
shopt -s globstar
|
||||
|
||||
main(){
|
||||
|
||||
######## FIRST CHECK ########
|
||||
|
@ -488,7 +485,7 @@ preconfigurePackages(){
|
|||
# make the module part of the package since the module itself is built at install time
|
||||
# and not part of the .deb).
|
||||
# Source: https://github.com/MichaIng/DietPi/blob/7bf5e1041f3b2972d7827c48215069d1c90eee07/dietpi/dietpi-software#L1807-L1815
|
||||
for i in /lib/modules/*/kernel/net/wireguard/wireguard.ko; do
|
||||
for i in /lib/modules/**/wireguard.ko; do
|
||||
[[ -f $i ]] || continue
|
||||
dpkg-query -S "$i" &> /dev/null || continue
|
||||
WIREGUARD_BUILTIN=1
|
||||
|
@ -549,9 +546,11 @@ installDependentPackages(){
|
|||
fi
|
||||
done
|
||||
|
||||
local APTLOGFILE="$(mktemp)"
|
||||
|
||||
if command -v debconf-apt-progress > /dev/null; then
|
||||
# shellcheck disable=SC2086
|
||||
$SUDO debconf-apt-progress -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
$SUDO debconf-apt-progress --logfile "${APTLOGFILE}" -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
$SUDO ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
|
@ -571,6 +570,7 @@ installDependentPackages(){
|
|||
done
|
||||
|
||||
if [ "$FAILED" -gt 0 ]; then
|
||||
cat "${APTLOGFILE}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -1178,32 +1178,6 @@ askAboutCustomizing(){
|
|||
fi
|
||||
}
|
||||
|
||||
downloadVerifyKey(){
|
||||
local KEY_URL="$1"
|
||||
local EXPECTED_KEY_ID="$2"
|
||||
|
||||
local KEY_CONTENT
|
||||
local KEY_INFO
|
||||
local DOWNLOADED_KEY_ID
|
||||
|
||||
if ! KEY_CONTENT="$(wget -qO- "$KEY_URL")"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! KEY_INFO="$(gpg --show-key --with-colons <<< "$KEY_CONTENT")"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
DOWNLOADED_KEY_ID="$(sed -n '/^pub:/,/^fpr:/p' <<< "$KEY_INFO" | grep '^fpr' | cut -d ':' -f 10)"
|
||||
|
||||
if [ "$DOWNLOADED_KEY_ID" != "$EXPECTED_KEY_ID" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$KEY_CONTENT"
|
||||
return 0
|
||||
}
|
||||
|
||||
installOpenVPN(){
|
||||
local PIVPN_DEPS
|
||||
|
||||
|
@ -1215,17 +1189,11 @@ installOpenVPN(){
|
|||
PIVPN_DEPS=(gnupg)
|
||||
installDependentPackages PIVPN_DEPS[@]
|
||||
|
||||
# We will download the repository key for the official repository from a
|
||||
# keyserver. If we fail, we will attempt to download the key via HTTPS
|
||||
# OpenVPN repo's public GPG key (fingerprint 0x30EBF4E73CCE63EEE124DD278E6DA8B4E158C569)
|
||||
echo "::: Adding repository key..."
|
||||
if ! $SUDO apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "$OPENVPN_KEY_ID"; then
|
||||
echo "::: Import via keyserver failed, now trying wget"
|
||||
if ! downloadVerifyKey "$OPENVPN_KEY_URL" "$OPENVPN_KEY_ID" | $SUDO apt-key add -; then
|
||||
echo "::: Can't import OpenVPN GPG key"
|
||||
exit 1
|
||||
else
|
||||
echo "::: Acquired key $OPENVPN_KEY_ID"
|
||||
fi
|
||||
if ! $SUDO apt-key add "${pivpnFilesDir}"/files/etc/apt/repo-public.gpg; then
|
||||
echo "::: Can't import OpenVPN GPG key"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "::: Adding OpenVPN repository... "
|
||||
|
@ -2034,6 +2002,13 @@ confOVPN(){
|
|||
}
|
||||
|
||||
confWireGuard(){
|
||||
# Reload job type is not yet available in wireguard-tools shipped with Ubuntu 20.04
|
||||
if ! grep -q 'ExecReload' /usr/lib/systemd/system/wg-quick@.service; then
|
||||
echo "::: Adding additional reload job type for wg-quick unit"
|
||||
$SUDO install -D -m 644 "${pivpnFilesDir}"/files/etc/systemd/system/wg-quick@.service.d/override.conf /etc/systemd/system/wg-quick@.service.d/override.conf
|
||||
$SUDO systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -d /etc/wireguard ]; then
|
||||
# Backup the wireguard folder
|
||||
WIREGUARD_BACKUP="wireguard_$(date +%Y-%m-%d-%H%M%S).tar.gz"
|
||||
|
|
162
files/etc/apt/repo-public.gpg
Normal file
162
files/etc/apt/repo-public.gpg
Normal file
|
@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N0Ntj5cB3ILpK7tR8cPkQrlvyZAmwVkTUY7LDZ/Rqmc809B26qF3M2Lz
|
||||
8cC66PrFY9f3y/uWc1QRqKg9GjZM85AS2BRzT+LMycuRiYq1S+V1p2xQglgKv3q+
|
||||
lrgzQDJ4QCszdCZVl0lufAqKlOuCcisBnTdLacjM/88pZh1ukzwvKm97yQjWpfFm
|
||||
HLKKA/RgtbR/qINmdUsXoDS1ZYDMyzHbZ6x8YJOZsPzgPBS9uqN8AwMHz4AGgmEi
|
||||
/eD5PDgVMzburMXNLNxFFLT6cVUCULTozKBfTp/bncEOHf4l+OG3Vgwe1RVdxU3c
|
||||
VHxVxJNKrv1//EX/
|
||||
=qIrL
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
ExecReload=/bin/bash -c 'exec /usr/bin/wg syncconf %i <(exec /usr/bin/wg-quick strip %i)'
|
|
@ -14,9 +14,9 @@ if [ ! -f "${EASYRSA}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
$EASYRSA update-db >> /dev/null 2>1
|
||||
$EASYRSA update-db >> /dev/null 2>&1
|
||||
|
||||
printf ": NOTE : The first entry should always be your valid server!\n"
|
||||
printf ": NOTE : The first entry is your server, which should always be valid!\n"
|
||||
printf "\\n"
|
||||
printf "\\e[1m::: Certificate Status List :::\\e[0m\\n"
|
||||
{
|
||||
|
@ -28,13 +28,13 @@ while read -r line || [ -n "$line" ]; do
|
|||
EXPD=$(echo "$line" | awk '{if (length($2) == 15) print $2; else print "20"$2}' | cut -b 1-8 | date +"%b %d %Y" -f -)
|
||||
|
||||
if [ "${STATUS}" == "V" ]; then
|
||||
printf "Valid \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||
printf "Valid \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
|
||||
elif [ "${STATUS}" == "R" ]; then
|
||||
printf "Revoked \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||
printf "Revoked \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
|
||||
elif [ "${STATUS}" == "E" ]; then
|
||||
printf "Expired \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||
printf "Expired \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
|
||||
else
|
||||
printf "Unknown \t %s \t %s\\n" "$NAME" "$EXPD"
|
||||
printf "Unknown \t %s \t %s\\n" "$(echo -e "$NAME")" "$EXPD"
|
||||
fi
|
||||
|
||||
done <${INDEX}
|
||||
|
|
|
@ -32,10 +32,10 @@ function listOVPNFunc {
|
|||
|
||||
function debugFunc {
|
||||
echo "::: Generating Debug Output"
|
||||
$SUDO ${scriptDir}/${vpn}/pivpnDebug.sh | tee /tmp/debug.txt
|
||||
$SUDO ${scriptDir}/${vpn}/pivpnDebug.sh | tee /tmp/debug.log
|
||||
echo "::: "
|
||||
echo "::: Debug output completed above."
|
||||
echo "::: Copy saved to /tmp/debug.txt"
|
||||
echo "::: Copy saved to /tmp/debug.log"
|
||||
echo "::: "
|
||||
exit 0
|
||||
}
|
||||
|
|
|
@ -34,29 +34,15 @@ echo -e ":::: Having trouble connecting? Take a look at the FAQ:"
|
|||
echo -e ":::: \e[1mhttps://github.com/pivpn/pivpn/wiki/FAQ\e[0m"
|
||||
printf "=============================================\n"
|
||||
echo -e ":::: \e[4mSnippet of the server log\e[0m ::::"
|
||||
tail -20 /var/log/openvpn.log > /tmp/snippet
|
||||
OVPNLOG="$(tail -n 20 /var/log/openvpn.log)"
|
||||
|
||||
# Regular expession taken from https://superuser.com/a/202835, it will match invalid IPs
|
||||
# like 123.456.789.012 but it's fine since the log only contains valid ones.
|
||||
declare -a IPS_TO_HIDE=($(grepcidr -v 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 /tmp/snippet | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | uniq))
|
||||
declare -a IPS_TO_HIDE=($(grepcidr -v 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 <<< "$OVPNLOG" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | uniq))
|
||||
for IP in "${IPS_TO_HIDE[@]}"; do
|
||||
sed -i "s/$IP/REDACTED/g" /tmp/snippet
|
||||
OVPNLOG="${OVPNLOG//"$IP"/REDACTED}"
|
||||
done
|
||||
|
||||
cat /tmp/snippet
|
||||
rm /tmp/snippet
|
||||
echo "$OVPNLOG"
|
||||
printf "=============================================\n"
|
||||
echo -e "::::\t\t\e[4mDebug complete\e[0m\t\t ::::"
|
||||
|
||||
# Telekom Hybrid Check
|
||||
wget -O /tmp/hybcheck http://speedport.ip &>/dev/null
|
||||
if grep -Fq "Speedport Pro" /tmp/hybcheck || grep -Fq "Speedport Hybrid" /tmp/hybcheck
|
||||
then
|
||||
printf ":::\t\t\t\t\t:::\n::\tTelekom Hybrid Check\t\t ::\n:::\t\t\t\t\t:::\n"
|
||||
echo "Are you using Telekom Hybrid (found a hybrid compatible router)?"
|
||||
echo "If yes and you have problems with the connections you can test the following:"
|
||||
echo "Add 'tun-mtu 1316' in /etc/openvpn/easy-rsa/pki/Default.txt to set a hybrid compatible MTU size (new .ovpn files)."
|
||||
echo "For already existing .ovpn files 'tun-mtu 1316' can also be inserted there manually."
|
||||
echo "With Telekom hybrid connections, you may have to experiment a little with MTU (tun-mtu, link-mtu and mssfix)."
|
||||
fi
|
||||
rm /tmp/hybcheck
|
||||
|
|
|
@ -58,7 +58,7 @@ if [[ -z "${CERTS_TO_REVOKE}" ]]; then
|
|||
NAME=$(echo "$line" | sed -e 's:.*/CN=::')
|
||||
if [ "$i" != 0 ]; then
|
||||
# Prevent printing "server" certificate
|
||||
CERTS[$i]=${NAME}
|
||||
CERTS[$i]=$(echo -e "${NAME}")
|
||||
fi
|
||||
let i=i+1
|
||||
fi
|
||||
|
@ -102,7 +102,7 @@ else
|
|||
while read -r line || [ -n "$line" ]; do
|
||||
STATUS=$(echo "$line" | awk '{print $1}')
|
||||
if [[ "${STATUS}" = "V" ]]; then
|
||||
NAME=$(echo "$line" | sed -e 's:.*/CN=::')
|
||||
NAME=$(echo -e "$line" | sed -e 's:.*/CN=::')
|
||||
CERTS[$i]=${NAME}
|
||||
let i=i+1
|
||||
fi
|
||||
|
|
|
@ -146,6 +146,10 @@ removeAll(){
|
|||
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/wg-quick@.service.d/override.conf ]; then
|
||||
rm -f /etc/systemd/system/wg-quick@.service.d/override.conf
|
||||
fi
|
||||
|
||||
elif [ "${i}" = "unattended-upgrades" ]; then
|
||||
|
||||
rm -rf /var/log/unattended-upgrades
|
||||
|
|
|
@ -26,7 +26,12 @@ listConnected(){
|
|||
}
|
||||
|
||||
debug(){
|
||||
$SUDO ${scriptdir}/${vpn}/pivpnDEBUG.sh
|
||||
echo "::: Generating Debug Output"
|
||||
$SUDO ${scriptdir}/${vpn}/pivpnDEBUG.sh | tee /tmp/debug.log
|
||||
echo "::: "
|
||||
echo "::: Debug output completed above."
|
||||
echo "::: Copy saved to /tmp/debug.log"
|
||||
echo "::: "
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue