Skip to content

Instantly share code, notes, and snippets.

@craibuc
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save craibuc/14012906126402543ffe to your computer and use it in GitHub Desktop.

Select an option

Save craibuc/14012906126402543ffe to your computer and use it in GitHub Desktop.
Install OpenVPN on Raspberry Pi
# Connect to RPi via ssh:
$ ssh pi@raspberrypi.local
# Act as superuser:
pi@raspbmc:~$ sudo bash
# Upgrade apt-get’s packages:
root@raspbmc:/home/pi# apt-get upgrade
# Install OpenVPN:
root@raspbmc:/home/pi# apt-get install openvpn
# Install configuration and certificate files:
root@raspbmc:/home/pi# cd /etc/openvpn
root@raspbmc:/home/pi# wget http://torguard.net/downloads/TorGuardPRO.zip
root@raspbmc:/home/pi# unzip TorGuardPRO.zip
root@raspbmc:/home/pi# rm TorGuardPRO.zip
root@raspbmc:/home/pi# cd TorGuardPRO
# Save credentials in a file:
root@raspbmc:/home/pi# echo -e "ACCOUNT\nPASSWORD\n" > auth.txt
# Modify every .OVPN file; set auth-user-pass property to auth-user-pass auth.txt
root@raspbmc:/home/pi# sed -i -e 's/auth-user-pass/auth-user-pass auth.txt/' *.ovpn
# Exit superuser mode:
root@raspbmc:/home/pi# exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment