How to set up OpenVPN for Raspberry Pi Desktop (Debian)

Looking to set up OpenVPN on Raspberry Pi? Here is the easy-to-follow guide for you.

Written By Fahad Ahmed

Updated at March 5th, 2024

The following is required for setting an OpenVPN connection on Raspberry Pi desktop.

How to Download OpenVPN files

  • First, open the web browser (Firefox) and download the PureVPN OpenVPN configuration files by clicking šŸ‘‰Ā here and extracting them.

  • Now rename the extracted folder toĀ OVPNfiles.

  • Now go to theĀ MenuĀ bar and select/ open theĀ TerminalĀ from there.

  • Now you will need to install OpenVPN packages. Type the following to install it:

  • sudo bash
  • sudo apt-get install openvpn
  • Now access the directory/ folder where you have downloaded the OpenVPN files (i.e. the Downloads folder) then copy and replace OVPNfiles to /etc/openvpn:

  • cd Downloads/
  • sudo cp OVPNfiles/* /etc/openvpn
Delete

How to set up OpenVPN for Raspberry Pi Desktop (Debian)

Configure OpenVPN Command Line Interface (CLI) on Raspberry Pi (Debian) using this comprehensive guide. Set up secure and private VPN connections through the command line interface, enhancing your online security on your Raspberry Pi.

  • A working installation of Debian 11 (Debian Bullseye)
  • A PureVPN premium account (Donā€™t have one? Sign upĀ now!)
  • Firstly, you will need to install OpenVPN packages and files. Type the following to install them:
    1. sudo bash
    2. sudo apt-get install openvpn
  • Run the command to download PureVPN OpenVPN files and unzip/extract them.

wget https://d11a57lttb2ffq.cloudfront.net/heartbleed/router/Recommended-CA2.zip

unzip New+OVPN+Files.zip

  • Now access the directory where the openvpn files are downloaded and select either TCP or UDP location.
    1. cd New+OVPN+Files/UDP/
    2. OR
    3. cd New+OVPN+Files/TCP/
  • Now to connect to the VPN, run the command:

sudo openvpn ustx2-ovpn-udp.ovpn

  • (In this case the USA UDP server is used to connect to the VPN as an example. You are free to choose any server that best fits your requirements. In order to view all available servers and their names, press the Tab key twice immediately after sudo openvpn)

  • You will be immediately prompted to enter the Auth Username and Auth Password, enter your PureVPN username and its password respectively.

  • You are now connected to PureVPN.
  • In order to disconnect the connection, run this command:

sudo killall openvpn

Delete