modified startup scripts to support more vpn providers
This commit is contained in:
21
openvpn/btguard/btguard.ca.crt
Normal file
21
openvpn/btguard/btguard.ca.crt
Normal file
@@ -0,0 +1,21 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDcjCCAtugAwIBAgIJAPKjuBleHokmMA0GCSqGSIb3DQEBBQUAMIGDMQswCQYD
|
||||
VQQGEwJERTEVMBMGA1UECBMMSGVzc2UtTmFzc2F1MRIwEAYDVQQHEwlGcmFua2Z1
|
||||
cnQxEDAOBgNVBAoTB0JUR3VhcmQxEzARBgNVBAMTCkJUR3VhcmQgQ0ExIjAgBgkq
|
||||
hkiG9w0BCQEWE3N1cHBvcnRAYnRndWFyZC5jb20wHhcNMTAwODA3MDc0NTA5WhcN
|
||||
MjAwODA0MDc0NTA5WjCBgzELMAkGA1UEBhMCREUxFTATBgNVBAgTDEhlc3NlLU5h
|
||||
c3NhdTESMBAGA1UEBxMJRnJhbmtmdXJ0MRAwDgYDVQQKEwdCVEd1YXJkMRMwEQYD
|
||||
VQQDEwpCVEd1YXJkIENBMSIwIAYJKoZIhvcNAQkBFhNzdXBwb3J0QGJ0Z3VhcmQu
|
||||
Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4cBR6VLQICqdpTsjosIQ5
|
||||
9elQZSRNQFaxWW3MeRC1xpJqjkbLJ9B9IO/Q/UyOa4a3qYHg8rI43wIF/RR6bwNX
|
||||
3sZ5w6TrdVBk0DFZq6lDQ8/4Kpg1dKbdAgJjvtxiyrHWFtB0jYVGTlxwBSPflc2J
|
||||
RZDMAVVj83gQh8ODJeGjnwIDAQABo4HrMIHoMB0GA1UdDgQWBBQCj1U+EICMz8hF
|
||||
++KZ8Ld1vR0sqTCBuAYDVR0jBIGwMIGtgBQCj1U+EICMz8hF++KZ8Ld1vR0sqaGB
|
||||
iaSBhjCBgzELMAkGA1UEBhMCREUxFTATBgNVBAgTDEhlc3NlLU5hc3NhdTESMBAG
|
||||
A1UEBxMJRnJhbmtmdXJ0MRAwDgYDVQQKEwdCVEd1YXJkMRMwEQYDVQQDEwpCVEd1
|
||||
YXJkIENBMSIwIAYJKoZIhvcNAQkBFhNzdXBwb3J0QGJ0Z3VhcmQuY29tggkA8qO4
|
||||
GV4eiSYwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQAgVeYTxvAonucE
|
||||
qWloEvzCCUWs8bS/HJ6M85WzG7FPNAXx2QbWwN3EMwKxtGc7QF8f+APoMukzsvd2
|
||||
vuI+1n0YwtD12cWMM9PLV2FhA2B+ajzssBTgvrbtX/SzKt0//lzrBp5Gyo6T/vO5
|
||||
9KRb6DVfVWfB76+DLpTf9f3SLTgzKw==
|
||||
-----END CERTIFICATE-----
|
21
openvpn/btguard/btguard.ovpn
Normal file
21
openvpn/btguard/btguard.ovpn
Normal file
@@ -0,0 +1,21 @@
|
||||
client
|
||||
dev tun0
|
||||
proto udp
|
||||
remote vpn.btguard.com 1194
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
verb 3
|
||||
mute 3
|
||||
mute-replay-warnings
|
||||
float
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/btguard/btguard.ca.crt
|
||||
auth-user-pass /config/openvpn-credentials.txt
|
||||
|
||||
# OpenVPN control startup and shut down of transmission
|
||||
script-security 2
|
||||
up /etc/transmission-daemon/start.sh
|
||||
down /etc/transmission-daemon/stop.sh
|
1
openvpn/btguard/default.ovpn
Symbolic link
1
openvpn/btguard/default.ovpn
Symbolic link
@@ -0,0 +1 @@
|
||||
btguard.ovpn
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
@@ -12,9 +12,9 @@ comp-lzo
|
||||
verb 1
|
||||
reneg-sec 0
|
||||
|
||||
ca /etc/openvpn/ca.crt
|
||||
auth-user-pass /config/pia-credentials.txt
|
||||
crl-verify /etc/openvpn/crl.pem
|
||||
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
|
||||
script-security 2
|
1
openvpn/pia/default.ovpn
Symbolic link
1
openvpn/pia/default.ovpn
Symbolic link
@@ -0,0 +1 @@
|
||||
Netherlands.ovpn
|
@@ -1,19 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]
|
||||
then
|
||||
echo "VPN PROVIDER: BTGUARD"
|
||||
vpn_provider="btguard"
|
||||
else
|
||||
echo "VPN PROVIDER: PIA"
|
||||
vpn_provider="pia"
|
||||
fi
|
||||
|
||||
if [ ! -z "$OPEN_VPN_CONFIG" ]
|
||||
then
|
||||
if [ -f /etc/openvpn/"${OPEN_VPN_CONFIG}".ovpn ]
|
||||
if [ -f /etc/openvpn/$vpn_provider/"${OPEN_VPN_CONFIG}".ovpn ]
|
||||
then
|
||||
echo "Starting OpenVPN using config ${OPEN_VPN_CONFIG}.ovpn"
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/${OPEN_VPN_CONFIG}.ovpn
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/$vpn_provider/${OPEN_VPN_CONFIG}.ovpn
|
||||
else
|
||||
echo "Supplied config ${OPEN_VPN_CONFIG}.ovpn could not be found."
|
||||
echo "Using default OpenVPN gateway: Netherlands"
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/Netherlands.ovpn
|
||||
echo "Using default OpenVPN gateway for provider ${vpn_provider}"
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/$vpn_provider/default.ovpn
|
||||
fi
|
||||
else
|
||||
echo "No VPN configuration provided. Using default: Netherlands"
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/Netherlands.ovpn
|
||||
echo "No VPN configuration provided. Using default."
|
||||
OPEN_VPN_CONFIG=/etc/openvpn/$vpn_provider/default.ovpn
|
||||
fi
|
||||
|
||||
# override resolv.conf
|
||||
@@ -24,14 +33,14 @@ then
|
||||
fi
|
||||
|
||||
# add PIA user/pass
|
||||
if [ "${PIA_USERNAME}" = "**None**" ] || [ "${PIA_PASSWORD}" = "**None**" ] ; then
|
||||
if [ "${OPENVPN_USERNAME}" = "**None**" ] || [ "${OPENVPN_PASSWORD}" = "**None**" ] ; then
|
||||
echo "PIA credentials not set. Exiting."
|
||||
exit 1
|
||||
else
|
||||
echo "Setting PIA credentials..."
|
||||
echo "Setting OPENVPN credentials..."
|
||||
mkdir -p /config
|
||||
echo $PIA_USERNAME > /config/pia-credentials.txt
|
||||
echo $PIA_PASSWORD >> /config/pia-credentials.txt
|
||||
echo $OPENVPN_USERNAME > /config/openvpn-credentials.txt
|
||||
echo $OPENVPN_PASSWORD >> /config/openvpn-credentials.txt
|
||||
fi
|
||||
|
||||
# add transmission credentials from env vars
|
||||
|
Reference in New Issue
Block a user