In this tutorial, you will learn how to set up the OpenVPN app on your Linux device. This method is a proven way to easily connect to the VPN from countries with internet restrictions like China, UAE, Russia, etc.
You will learn how to:
- Get your credentials
- Install the OpenVPN package
- Download the configuration files
- Connect to the VPN
You will need a device running Linux operating system and an active Surfshark subscription. If you don’t have the subscription yet, you can get it here.
Get your credentials
- Log in to your Surfshark account. You can find the direct link here. Here you will find the Credentials tab.
- Go to the VPN -> Manual setup -> Desktop or Mobile -> Credentials and copy the Username and the Password.
Install the OpenVPN package
- Open the terminal window.
You can do that by pressing Ctrl+Alt+T keys or navigating to it through your apps menu.
- Enter this command to install all the necessary packages:
sudo apt-get install openvpn unzip
You may need to enter your computer password to confirm this process. In such a case, enter the password and press Enter.
Download the configuration files
- Navigate to the OpenVPN directory. You can do that by entering this command:
- Download the Surfshark OpenVPN configuration files:
sudo wget https://surfshark.zendesk.com/hc/article_attachments/360018527519/configurations.zip
- Extract configurations.zip with this command:
sudo unzip configurations
- To see the list of all the available servers, enter:
Connect to the VPN
- Choose one server from the list you want to connect to and copy the hostname (URL) representing this server's hostname.
- Connect to this server by entering this command:
sudo openvpn paste the server name here
For example, if you'd like to connect to the US_udp server, this will be the command:
sudo openvpn US_udp.ovpn
- Before connecting to the server, you should enter Surfshark service credentials.
These are the credentials you collected in the 'Get your credentials' part. Then press enter.
- Can you see the 'Initialization Sequence Completed' line in your terminal?
Great! This means you have successfully connected to Surfshark!
- To disconnect from the OpenVPN connection, open the terminal and press Ctrl + C.
Congratulations - you have successfully installed and configured the OpenVPN connection on your Linux device! As long as you’re connected, your location is private, and your sensitive data is secure.
You may also be interested in