OpenVPN Step-by-Step Setup for Manjaro Linux (with video)

( * Updated for the new OVPN config files that use AES-128-CBC )


OpenVPN Setup on Manjaro Linux
=============================================

( *Outdated Video * ) showing the following steps being done in Manjaro Linux
        - https://youtu.be/JNn1lzlZeC8

For Debian based Linux Distributions - click here
For pfsense Setup - click here

Color Key
=============================================
Things highlighted in yellow are commands to be executed in the terminal
Things highlighted in blue are to be clicked
Things highlighted in green are to be typed
Things highlighted in violet are to be pressed on the keyboard
Things highlighted in grey are showing output


Install openvpn (seems it was already installed)
=============================================
- Open a Terminal windows and install openvpn packages with...
    sudo pacman -S openvpn
    - then press [enter]
    
Make a directory and download the ca.crt and crl.pem files
=============================================
- In Terminal - Make a directory to store the setup files
    mkdir ~/OpenVPN-setup-PIA
    - then press [enter]

- Move into that directory
    cd ~/OpenVPN-setup-PIA
    - then press [enter]

- Download the openvpn.zip from privateinternetaccess.com with...
    wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
    - then press [enter]

- Extract the files from the zip with...
    unzip openvpn.zip
    - then press [enter]

- You can now exit the terminal with...
    exit
    - then press [enter]

Import the PIA OpenVPN config file
=============================================
- Right click the Network Manager on the menu bar
    - and click "Edit Connections..."
    - then click "Add"
    - choose "Import a saved VPN configuration..." for the connection type from the drop down menu
    - then click "Create..."
    - double click to go into "OpenVPN-setup-PIA" folder
    - choose which server you would like to setup and connect to
    - then click "Open"
    - Remove only the ":1198" from the "Gateway:" ( if present ) as only the domain name should be in this box
    - for the "User name:" type in your "p1234567" username
    - for the "Password:" type in the password that goes with your "p-xxxxx" username
    - Then click "Advanced..."
    - Check "Use custom gateway port:" and set it to "1198"
    - Click on the "Security" tab
    - Set the "Cipher:" to "AES-128-CBC"
    - Set the "HMAC Authentication:" to "SHA-1"
    - Click "OK"
    - Click "Save"

Note: Go back into the "Edit Connections..." and recheck all the settings.  Some times it seem to take setting the "AES-128-CBC" two times for it to stay set.  This might be a small bug with NetworkManager's import process.


Now connect to the VPN
=============================================
- Now Left click the Network Manager on the menu bar
    - click "VPN Connections"
    - click Ex. "Mexico" {This will be the name of the server you chose to setup}
    - wait for it to connect
    
- Test by opening your Internet browser and going to...
    https://www.privateinternetaccess.com/pages/whats-my-ip/
    https://ipleak.net/
    
Enjoy!


(optional manual OpenVPN config)
Now Configure Network Manager (Manual config)
=============================================
- Right click the Network Manager on the menu bar
    - and click "Edit Connections..."
    - then click "Add"
    - choose "OpenVPN" for the connection type from the drop down menu
    - then click "Create..."
    - for the "Connection name:" type in "Private Internet Access VPN"
    - for the "Gateway:" type in "us-west.privateinternetaccess.com" or...
        - whatever Hostname you would like to use from...
            https://www.privateinternetaccess.com/pages/network/
            - Ex. "brazil.privateinternetaccess.com"
            - Ex. "mexico.privateinternetaccess.com"
    - for the "Type:" select "Password" from the dropdown menu
    - for the "User name:" type in your "p1234567" username
    - for the "Password:" type in the password that goes with your "p-xxxxx" username
    - for the "CA Certificate:" browse and select the CA Certificate from ~/OpenVPN-setup-PIA folder
    - now click on "Advanced..."
    - Check "Use custom gateway port:" and set it to "1198"
    - Put a check in "Use LZO compression"
    - Click on the "Security" tab
    - Set the "Cipher:" to "AES-128-CBC"
    - Set the "HMAC Authentication:" to "SHA-1"
    - Click "OK"
    - Click "Save"
        - You may get asked to save a keyring password (you can leave this blank)

Now connect to the VPN
=============================================
- Now Left click the Network Manager on the menu bar
    - click "VPN Connections"
    - click "Private Internet Access"
    - wait for it to connect
    
- Test by opening your Internet browser and going to...
    https://www.privateinternetaccess.com/pages/whats-my-ip/
    https://ipleak.net/

Enjoy!

image

To donate, please scan the QR code to the left or send bitcoins to the following address:
17ioPjLoCLDsUKwNpGV9dGtnLmpM8ioyUn

Comments

  • Wow! Thanks very much for this contribution!
  • edited November 2015

    Synopsis said:
    Wow! Thanks very much for this contribution!

    You're welcome!

    I will be uploading lots of Linux setups for the next few weeks! :D

    Enjoy!

  • edited July 2015
    After some playing around, I have found that you can also run the PIA Linux binary on Manjaro (and therefore probably Arch) with:

    1) sudo pacman -S libdbusmenu-gtk3 libappindicator-gtk3 libappindicator-gtk2 libgcrypt15
    2) sudo ln -s /usr/lib/libjpeg.so.8.0.2 /usr/lib/libjpeg.so.62
    3) yaourt -S libselinux
    4) yaourt -S libcurl-compat
    5) yaourt -S libgnutls26
    6) sudo cp /usr/lib/lubcurl.so /usr/lib/libcurl.so.4
    7) Run PIA installer

    If you'd prefer to use a GUI (on Manjaro/Arch? Seriously?) then you can run pamac with AUR support enabled, and install everything from there. I've not tested this in a few months, though it did work OK back then. With that in mind I'd say as with anything the above is all at your own risk. I'd advise testing in a virtual machine before committing on a production system to be safe, unless you know what you're doing.
  • Thank you for your contribution rainmakerraw

    I will test within a VM and start a new post when I get a chance.

    w


  • Thank you for the tutorial. I have a question regarding an issue. Currently, whenever I first connect to a VPN it works fine, but then once I disconnect and then reconnect to the same/different VPN it doesn't work anymore, so my real IP address is showing. To get it to work again I usually have to reboot in order to connect successfully again. If you can help it's highly appreciated, thanks.
  • Can you post screen shots?  (obscure your IP obviously)
  • edited July 2015
    Can you post screen shots?  (obscure your IP obviously)
    Sorry, but I'm not sure what to screenshot. I first noticed the issue around Tuesday, June 7th. I presume it has to do with the update that occurred on June 6th. But if this error is only occurring for me, I have no idea then.

    My first connection is fine, but when that connection gets disconnected my second connection says it's connected, but when I go to an IP detection website it shows my real information. 

    I went to see if it was just my WebRTC leaking, but after following instructions to disable it, my real IP still shows. 

    I actually just performed a fresh install of Manjaro, and haven't touched anything besides enabling the VPN, but I still continue to have the same issue.
  • edited July 2015
    Can you post screen shots?  (obscure your IP obviously)
    Sorry, but I'm not sure what to screenshot. My first connection is fine, but when that connection gets disconnected my second connection says it's connected, but when I go to an IP detection website it shows my real information. I went to see if it was just my WebRTC leaking, but after following instructions to disable it, my real IP still shows. I actually just performed a fresh install of Manjaro, and haven't touched anything besides enabling the VPN, but I still continue to have the same issue.
    The thing that is really confusing me is that the VPN works 100% fine when I first boot my computer up... Once the VPN disconnects then it gets like "infected" and won't work anymore, until l "cleanse" the "infection" (rebooting my computer).
  • What version of Manjaro are you running?
  • I'm running on the latest version, v0.8.13
  • Strange it seems to be working fine disconnecting and reconnecting for me.

    http://youtu.be/61mn42LC_js

    Got any more info or details for me?

    w
  • edited July 2015
    Alright, I've created a set of screenshots, since making a video didn't work very well for me.


    This is all weird for me. Even with a fresh install of Manjaro Linux, I still had these errors. 

    This occurs with all browsers, applications, etc. (shows my real IP)

    My system is fully up-to-date. 

    When I was on Windows a few days ago (dual-boot) to see if I could connect to the VPN successfully via the client and it worked perfectly fine; disconnecting and reconnecting. So this appears to only be happening with OpenVPN on Manjaro for only myself...

    By the way, thank you for attempting to assist me. Even though it's not going well so far I do appreciate the effort.
  • edited July 2015
    Alright, I've created a set of screenshots, since making a video didn't work very well for me.


    This is all weird for me. Even with a fresh install of Manjaro Linux, I still had these errors. 

    This occurs with all browsers, applications, etc. (shows my real IP)

    My system is fully up-to-date. 

    When I was on Windows a few days ago (dual-boot) to see if I could connect to the VPN successfully via the client and it worked perfectly fine; disconnecting and reconnecting. So this appears to only be happening with OpenVPN on Manjaro for only myself...

    By the way, thank you for attempting to assist me. Even though it's not going well so far I do appreciate the effort.
    I did some investigating and I am able to confirm that...
        - It works as expected if it is a fresh install of Manjaro (without updates)
        - It does NOT work as expected if Manjaro has been updated

    It seems that Network Manger or something it depends on "breaks" after doing the basic updates to the system.


  • hi, i did all the steps even with the manual configuration but i cannot get connected i just got i message that say "the vpn connection has failed, the time connection with the server has expired" or something like that...what can i do to fix it?..thanks
  • probably a port issue when setting up vpn in network manager. try my approach to see whether it works for you. it functions properly for my SLED11SP4 distribution, no issues at all.

    https://www.privateinternetaccess.com/forum/discussion/21703/vpn-is-stuck-trying-to-connect

Sign In or Register to comment.