latest configs from PIA, scripted the adjustments for the container

This commit is contained in:
Kristian Haugene 2015-09-05 15:44:28 +02:00
parent c34467ea05
commit 62291483ae
32 changed files with 332 additions and 104 deletions

56
openvpn/adjustConfigs.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/sh
bold=$(tput bold)
normal=$(tput sgr0)
#
# This is a script to ease the process of updating and adding .ovpn files to the project.
# As some customizations have to be done with the .ovpn files from the providers
# this script was created to make it easy and also to highlight which changes we actually do and why.
#
# Intended usage is to download .zip (or other) package with .ovpn files from your provider.
# Then delete the content in the provider-folder, replace with the new ones, run the script and it should be quite good.
# Just need to double check that the default.ovpn is still there and that the diff to origin looks reasonable.
#
display_usage() {
echo "${bold}Hint: read the script before using it${normal}"
echo "If you just forgot: ./adjustConfigs.sh <provider-folder>"
}
# if no arguments supplied, display usage
if [ $# -lt 1 ]
then
display_usage
exit 1
fi
provider=$1
for configFile in $provider/*.ovpn;
do
# Set fixed tun device number
sed -i "s/dev tun.*/dev tun0/g" "$configFile"
# Absolute reference to ca cert
sed -i "s/ca .*\.crt/ca \/etc\/openvpn\/$provider\/ca.crt/g" "$configFile"
# Absolute reference to crl
sed -i "s/crl-verify.*\.pem/crl-verify \/etc\/openvpn\/$provider\/crl.pem/g" "$configFile"
# Set user-pass file location
sed -i "s/auth-user-pass.*/auth-user-pass \/config\/openvpn-credentials.txt/g" "$configFile"
# Insert transmission control script triggers
cat <<EOT >> $configFile
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh
EOT
done
echo "Updated all .ovpn files in folder $provider"

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

24
openvpn/pia/Brazil.ovpn Normal file
View File

@ -0,0 +1,24 @@
client
dev tun0
proto udp
remote brazil.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

24
openvpn/pia/Ireland.ovpn Normal file
View File

@ -0,0 +1,24 @@
client
dev tun0
proto udp
remote ireland.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

24
openvpn/pia/Italy.ovpn Normal file
View File

@ -0,0 +1,24 @@
client
dev tun0
proto udp
remote italy.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

24
openvpn/pia/Turkey.ovpn Normal file
View File

@ -0,0 +1,24 @@
client
dev tun0
proto udp
remote turkey.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -0,0 +1,24 @@
client
dev tun0
proto udp
remote us-newyorkcity.privateinternetaccess.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh

View File

@ -6,17 +6,19 @@ resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/pia/ca.crt
tls-client
remote-cert-tls server
auth-user-pass /config/openvpn-credentials.txt
comp-lzo
verb 1
reneg-sec 0
ca /etc/openvpn/pia/ca.crt
auth-user-pass /config/openvpn-credentials.txt
crl-verify /etc/openvpn/pia/crl.pem
# OpenVPN control startup and shut down of transmission
# OpenVPN controls startup and shut down of transmission
script-security 2
up /etc/transmission/start.sh
down /etc/transmission/stop.sh