Welcome! Log In Create A New Profile

Advanced

How to set up manual OpenVPN connection Using Linux/Debian terminal

Posted by echowarrior108 
How to set up manual OpenVPN connection Using Linux/Debian terminal
April 08, 2021 03:53AM
Below I copied the latest install for surfshark from their website this was not written by me but I did modify it for this forum, I copied it for those that don't feel comfortable accessing external links,I do not work for surfshark and I am a paid user of this product so be aware that if you use the product they will charge for service, I believe you can get a free version from some vpn providers as well. It does work well on my pogoplug v3 oxnas. also note if you are running noip to run your server you will want to get your server ip address.
I used the following:
wget -O - -q https://icanhazip.com/


Here is link: https://support.surfshark.com/hc/en-us/articles/360011051133-How-to-set-up-OpenVPN-using-Linux-Terminal


How to set up manual OpenVPN connection using Linux Terminal?

In this tutorial, you will learn how to set up an OpenVPN connection on your Linux device. This is an alternative way of connecting to Surfshark servers that will come in handy if the Surfshark VPN app can not be installed on your device or it does not perform as expected.

You will need a device running the Linux operating system and an active Surfshark subscription. If you don’t have the subscription yet, you can get it here.
https://surfshark.com/


Get your credentials
Install the OpenVPN package
Download configuration files
Connect to the VPN

This tutorial uses Ubuntu distribution. Please note that some configurations may vary depending on the Linux distribution you are using.



Get your credentials


You will need Surfshark service credentials to connect to the VPN using a manual OpenVPN connection. Do not confuse these with your regular credentials, namely your email address and your password.

Here is how you can get Surfshark service credentials:

Go to this page where all the details required for manual connection are stored.

You may need to log in before proceeding to this page. In that case, enter your email address and your password, then click Log in.

Click on the Credentials tab. You will find Surfshark service credentials there.

It is a good idea to keep this page open for now. You will need these credentials a bit later.




Install the OpenVPN package


Open the terminal window.

You can do that by pressing Ctrl+Alt+T keys or navigating to it in your apps menu.



Enter the following 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 configuration files


Navigate to the OpenVPN directory. You can do that by entering this command:


 cd /etc/openvpn


Download the Surfshark OpenVPN configuration by entering the following command:

 wget https://my.surfshark.com/vpn/api/v1/server/configurations

Extract the configurations.zip by entering this command:


 sudo unzip configurations



Enter the following command to see the list of all the available servers:


 ls



Connect to the VPN


Choose one server from the list that you want to connect to and copy the hostname (URL) representing this server's hostname.



Connect to your chosen server by entering this command:


  sudo openvpn paste the server name here

For example, if you'd like to connect to the us-slc server, this would be the command:


  sudo openvpn us-slc.prod.surfshark.com_



Before you can be connected to the server, you should enter Surfshark service credentials.

Enter the credentials that you collected in the 'Get your credentials' part, and press enter.



If you can see the 'Initialization Sequence Completed' line in your terminal, you have successfully connected to Surfshark!



To disconnect from the OpenVPN connection, open the terminal and press Ctrl + C.


Congratulations - you have successfully configured OpenVPN manual connection! As long as you’re connected, your location is private, and your sensitive data is secure.

Echowarrior108

device: pogoplug-pro v3

Currently running:
Linux version 5.15.158-oxnas-tld-2 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 SMP PREEMPT Sun May 12 18:45:05 PDT 2024
Debian 12.6



Edited 1 time(s). Last edit at 04/08/2021 03:56AM by echowarrior108.
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 08, 2021 04:18PM
echowarrior108,

Thanks!

I think it's a good example of how to start using OpenVPN.

Even though it is too specific to this provider, installation procedure for other providers probably very similar.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 10, 2021 07:34PM
Yes very specific to the VPN provider. It was better written to what I would have done:) lol

Echowarrior108

device: pogoplug-pro v3

Currently running:
Linux version 5.15.158-oxnas-tld-2 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 SMP PREEMPT Sun May 12 18:45:05 PDT 2024
Debian 12.6
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 11, 2021 08:58PM
Added to the Wiki.

Quote

VPN

Setup OpenVPN

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 04/11/2021 08:58PM by bodhi.
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 12, 2021 12:43AM
Cool and many thanks!!!!

Just set this up on my other plug and used a different server, one says its in las vegas and the other is in tampa fl lol... it bypasses my router vpn which is currently in NYC. so basically I can set all my home devices manually and always have my router showing as a default vpn location. I am glad I know where I am:)

Echowarrior108

device: pogoplug-pro v3

Currently running:
Linux version 5.15.158-oxnas-tld-2 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 SMP PREEMPT Sun May 12 18:45:05 PDT 2024
Debian 12.6



Edited 1 time(s). Last edit at 04/12/2021 12:44AM by echowarrior108.
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 12, 2021 12:49AM
> I am glad I know where I am:)

Be careful now, you don't want to to have to call Tech Support to know where you are (cue Tom Cruise running in the parking lot yelling) :D

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to set up manual OpenVPN connection Using Linux/Debian terminal
April 12, 2021 12:52AM
bodhi Wrote:
-------------------------------------------------------
> > I am glad I know where I am:)
>
> Be careful now, you don't want to to have to call
> Tech Support to know where you are (cue Tom Cruise
> running in the parking lot yelling) :D


Too Funny!! :D

Echowarrior108

device: pogoplug-pro v3

Currently running:
Linux version 5.15.158-oxnas-tld-2 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 SMP PREEMPT Sun May 12 18:45:05 PDT 2024
Debian 12.6
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: