How to set up manual OpenVPN connection using Linux Terminal (2024)

In this tutorial, you will learn how to set up an OpenVPN connection on your Linux device.

To set up OpenVPN on Linux, you will need a device running Linux OS and an active Surfshark subscription. You can find the available plans on Surfshark’s pricing page.

We will cover the following:

  1. Get your credentials
  2. Download and install the OpenVPN package
  3. Download configuration files
  4. Connect to the VPN
  5. Ensure your connection was successful

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

Get your credentials

NOTE: These are not your regular credentials, such as your email address and password.

  1. Enter the Surfshark login page and log in. Then, click on VPN > Manual Setup. This is the page where all the details required for manual connection are stored.
  2. Click Desktop or Mobile > OpenVPN. Proceed to the Credentials tab. Click on the Credentials tab at the top.
    How to set up manual OpenVPN connection using Linux Terminal (1)
    NOTE: Keep this page open for now. You will need these credentials a bit later.

Download and install the OpenVPN package

  1. Open the terminal window. You can do that by pressing Ctrl+Alt+T keys or navigating to it in your apps menu.
    How to set up manual OpenVPN connection using Linux Terminal (2)
  2. 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.

    How to set up manual OpenVPN connection using Linux Terminal (3)

Download configuration files

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

    cd /etc/openvpn

    How to set up manual OpenVPN connection using Linux Terminal (4)
  2. Download the Surfshark OpenVPN configuration by entering the following command:
    sudo wget https://surfshark.zendesk.com/hc/article_attachments/360018527519/configurations.zip

    How to set up manual OpenVPN connection using Linux Terminal (5)
  3. Extract the configurations.zip by entering this command:

    sudo unzip configurations

    How to set up manual OpenVPN connection using Linux Terminal (6)
  4. Enter the following command to see the list of all the available servers:

    ls

    How to set up manual OpenVPN connection using Linux Terminal (7)

Connect to the VPN

  1. Choose one server from the list that you want to connect to and copy the hostname (URL) representing this server's hostname.
    How to set up manual OpenVPN connection using Linux Terminal (8)
  2. Connect to your chosen server by entering this command:

    sudo openvpn

    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_udp.ovpn

    How to set up manual OpenVPN connection using Linux Terminal (9)
  3. Enter Surfshark service credentials(refer toGet your credentialssection in this article). PressEnter.
    How to set up manual OpenVPN connection using Linux Terminal (10)
  4. If you can see the 'Initialization Sequence Completed' line in your terminal, you have successfully connected.
    How to set up manual OpenVPN connection using Linux Terminal (11)
  5. To disconnect from the OpenVPN connection, open the terminal and press Ctrl + C.
    How to set up manual OpenVPN connection using Linux Terminal (12)

Ensure the connection is successful

We always recommend checking if Surfshark VPN is working after setting it up for the first time. You can easily do it by performing Surfshark IP leak test and a DNS leak test. For your convenience, both are available on our website.


You may also be interested in:

Was this article helpful?

Thank you for your feedback!

How to set up manual OpenVPN connection using Linux Terminal (2024)
Top Articles
Leap29 | The Netherlands: 6 Reasons why the Netherlands is a Great Place to Live
10 New Female Country Singers: Rising Icons in Country Music
Friskies Tender And Crunchy Recall
It's Official: Sabrina Carpenter's Bangs Are Taking Over TikTok
Tmf Saul's Investing Discussions
Is pickleball Betts' next conquest? 'That's my jam'
Lowes 385
Osrs But Damage
Sunday World Northern Ireland
Garrick Joker'' Hastings Sentenced
Lantana Blocc Compton Crips
Local Dog Boarding Kennels Near Me
Wisconsin Women's Volleyball Team Leaked Pictures
Fredericksburg Free Lance Star Obituaries
Sony E 18-200mm F3.5-6.3 OSS LE Review
Stihl Km 131 R Parts Diagram
Viprow Golf
Pretend Newlyweds Nikubou Maranoshin
Drago Funeral Home & Cremation Services Obituaries
Nordstrom Rack Glendale Photos
Lista trofeów | Jedi Upadły Zakon / Fallen Order - Star Wars Jedi Fallen Order - poradnik do gry | GRYOnline.pl
Kaitlyn Katsaros Forum
Raz-Plus Literacy Essentials for PreK-6
Like Some Annoyed Drivers Wsj Crossword
Galaxy Fold 4 im Test: Kauftipp trotz Nachfolger?
48 Oz Equals How Many Quarts
How To Tighten Lug Nuts Properly (Torque Specs) | TireGrades
3Movierulz
Craigslist Hunting Land For Lease In Ga
Abga Gestation Calculator
Phoenixdabarbie
Summoners War Update Notes
Log in to your MyChart account
Best New England Boarding Schools
Does Circle K Sell Elf Bars
Royal Caribbean Luggage Tags Pending
Plato's Closet Mansfield Ohio
Dreammarriage.com Login
2016 Honda Accord Belt Diagram
Montrose Colorado Sheriff's Department
Ljw Obits
2008 Chevrolet Corvette for sale - Houston, TX - craigslist
Petsmart Northridge Photos
450 Miles Away From Me
D-Day: Learn about the D-Day Invasion
Dogs Craiglist
Juiced Banned Ad
'The Night Agent' Star Luciane Buchanan's Dating Life Is a Mystery
Is Chanel West Coast Pregnant Due Date
Jeep Forum Cj
Washington Craigslist Housing
Fahrpläne, Preise und Anbieter von Bookaway
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 6036

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.