ASN

Notes by Akhil Saji

How to install OpenVPN Client on OMV (openmediavault)

OMV (openmediavault) is an open source NAS operating system based on Debian. If you're not familiar with it, head here and check it out.

This tutorial assumes basic knowledge of Linux and root access to your OMV server. Lets get started.

  1. Installing OpenVPN (as root)

    apt-get install openvpn

  2. After installing OpenVPN, you'll want to obtain the VPN certificate files. These should be provided to you by your VPN provider. My personal recommendation is PIA. If you choose to utilize PIA, you can download the necessary files here.

  3. At this point you'll want to transfer the certificate files over to your server either using SCP or some other mechanism. I personally recommend directly downloading it on the server with wget and then unzipping it with unzip.

  4. From your extracted files, move ca.crt, crl.pem, vpn.ovpn to /etc/openvpn/ (Note: vpn.ovpn refers to whatever VPN server you're looking to connect to)

  5. edit the vpn.ovpn file using whatever editor you prefer and replace the line

    auth-user-pass
    with
    auth-user-pass login.txt
    Save and close the file.

  6. Next, create login.txt in /etc/openvpn and place your username on the first line, and your password on the second line. These should be provided to you by your VPN provider.

    Username
    Password

  7. Now change the extension of vpn.ovpn file to vpn.conf

    mv vpn.ovpn vpn.conf

  8. To ensure that OpenVPN connects to this VPN on start, we must edit the openvpn configuration file. Open /etc/default/openvpn in your editor of choice and add the entry AUTOSTART=vpn where vpn refers to the vpn.conf file in /etc/openvpn/. Adding this entry will allow openvpn to search for this configuration file on start and run it.

  9. Lets test our handywork. Start and run openvpn

    openvpn /etc/openvpn/vpn.conf

  10. Now test the connection using

    curl -s http://ifconfig.me
    You should see a different WAN IP which represents your VPN IP.

  11. Now restart openvpn and be set

    /etc/init.d/openvpn restart