Skip to content

Commit

Permalink
Upgrade OpenVPN to 2.4 on Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkoc authored and Mikko Caldara committed Jun 17, 2019
1 parent 63ada85 commit 2d15300
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,26 @@ verb 3
ca ca.crt
auth-user-pass login.conf
reneg-sec 0
status /var/log/openvpn-status.log
log /var/log/openvpn.log
EOF

case "$OSTYPE" in
linux*)
echo "Configuring for Ubuntu"

curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt update -y > /dev/null 2>&1
apt install -y openvpn > /dev/null 2>&1

echo ${ca_crt} | base64 -d > /etc/openvpn/ca.crt
echo ${user_pass} | base64 -d > /etc/openvpn/login.conf

sudo cp client.ovpn /etc/openvpn/client.conf
cp client.ovpn /etc/openvpn/client.conf

service openvpn start client > /dev/null 2>&1
sleep 5
sleep 10

if ifconfig | grep tun0 > /dev/null
then
Expand Down

0 comments on commit 2d15300

Please sign in to comment.