Skip to content

Commit

Permalink
openvpn.sh tweaks based on latest PIA conf
Browse files Browse the repository at this point in the history
  • Loading branch information
David Personette committed May 19, 2017
1 parent f842f3f commit e0974e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ timezone() { local timezone="${1:-EST5EDT}"
# pass) password on VPN
# port) port to connect to VPN (optional)
# Return: configured .ovpn file
vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" i
vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" i pem
pem=$(\ls $dir/*.pem)

echo "client" >$conf
echo "dev tun" >>$conf
echo "proto udp" >>$conf
Expand All @@ -126,13 +128,14 @@ vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" i
echo "nobind" >>$conf
echo "persist-key" >>$conf
echo "ca $cert" >>$conf
[[ $(wc -w <<< $pem) -eq 1 ]] && echo "crl-verify $pem" >>$conf
echo "tls-client" >>$conf
echo "remote-cert-tls server" >>$conf
echo "auth-user-pass $auth" >>$conf
echo "comp-lzo" >>$conf
echo "verb 1" >>$conf
echo "reneg-sec 0" >>$conf
echo "redirect-gateway def1" >>$conf
echo "auth-user-pass $auth" >>$conf

echo "$user" >$auth
echo "$pass" >>$auth
Expand Down

0 comments on commit e0974e7

Please sign in to comment.