In this guide I will show you how to connect your Ubuntu/Debian Linux PC/laptop to any VPN service that’s using the OpenVPN protocol. OpenVPN is a fast and secure protocol and most VPN service providers and some workplaces will support it.
Before we start the connection setup process, you will need to find out the following details (best have them written down or printed). If you are connecting to a paid VPN service, just login and your details and settings will be there. If you are connecting via a workplace, please contact your Network Administrator and ask them for the following details:
- Your VPN username
- Your VPN password
- One or more OpenVPN configuration files (.ovpn) which you can find via your VPN service providers website or Network Administrator
Once you have this info you can then watch the video above or follow the text guide below.
Connect VPN via OpenVPN on Ubuntu/Debian Linux
- Open Terminal by clicking on the Search Computer icon and type Terminal, click on the first result
- With Terminal open, type
sudo apt-get install openvpnthen hit Enter, press y key if required, Ubuntu should then install the OpenVPN app or advise you if it’s already installed
- Open your web browser and download your VPN service providers OpenVPN config files (.ovpn) you may have to login to access these files.
- Locate the downloaded files and if required tar or unzip them to
tar zxf /home/pchelp/Downloads/vpnconfigs.tar /etc/openvpn
- Important Note: If any of the unzipped config files have spaces in the name, you must replace them with hyphens – or underscores _ otherwise OpenVPN will throw an error
- Open Terminal and type
sudo openvpn --config /etc/openvpn/config.ovpnreplacing
config.ovpnwith the desired config file and hit Enter to connect
- The OpenVPN connection window will open and request your username and password, so enter those and click OK
- OpenVPN will attempt the connection and advise you if it was successful
- Further customization of the OpenVPN application can be achieved via the example files located at
- To disconnect type
killall -TERM openvpnor press Ctrl + C
- All done!
- OpenVPN Client and Server at Ubuntu
- OpenVPN Official Site
- OpenVPN at WikiPedia
- Search Google for OpenVPN