Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [HOW-TO] OpenVPN on the command line

    Reply
    Page 1 of 2 | 1   2   | Next
    Fawz | # 1 | 2014-01-04, 21:54 | Report

    When browsing the running services with systemctl I noticed that connman-vpn.service was running. So I checked the nemo repository and it contained an openvpn package. Turns out OpenVpn works on the Jolla from the command line! Here's how you can get it working. Note that you need to enable developer mode. This is only for connecting via the command line/terminal.

    1) Copy you certificates and OpenVPN profiles to a directory on the phone. Note where that directory is.

    2) Install OpenVPN.

    Code:
    $ devel-su
    # pkcon refresh
    # pkcon install openvpn
    3) Move the resolv updater scripts into place and set execute permissions.

    Code:
    # cp /usr/share/doc/openvpn-2.2.2/contrib/pull-resolv-conf/* /etc/openvpn/.
    # chmod +x /etc/openvpn/client.*
    4) Modify your .ovpn config file(s) to point to the resolv updater scripts. In my case I needed to change:
    Originally Posted by
    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    to
    Originally Posted by
    up /etc/openvpn/client.up
    down /etc/openvpn/client.down
    Either change the files before you copy them to the phone or use nano on the phone's terminal. See http://talk.maemo.org/showthread.php?t=92036 how to install nano.

    5) Change to the directory containing the config files and connect. Replace where indicated with your path and config file name.
    Code:
    # cd <your directory path>
    # openvpn <yourconfig>.ovpn
    With the right username/password and configs it should now connect to the vpn.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 12 Users Say Thank You to Fawz For This Useful Post:
    CLRS530, cy8aer, H1777, Iryus, Matti, minimos, N9uwu, rainisto, shmerl, velox, zlatko

     
    H1777 | # 2 | 2014-01-05, 00:54 | Report

    Sweet!!! Thanks for this!
    Had some problems setting up, getting script-security error.
    Solved by adding "script-security 2" to the .ovpn file and now it works beautifully :-)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Matti | # 3 | 2014-01-05, 13:46 | Report

    I always get:
    Code:
    Sun Jan  5 14:31:56 2014 /sbin/ip route add 0.0.0.0/0 via 192.168.xxxx.xxxx
    RTNETLINK answers: File exists
    Sun Jan  5 14:31:56 2014 ERROR: Linux route add command failed: external program exited with error status: 2
    So the route gets not set up correctly. Is it because of connman-vpnd running?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Fawz | # 4 | 2014-01-05, 16:07 | Report

    Originally Posted by Matti View Post
    I always get:
    Code:
    Sun Jan  5 14:31:56 2014 /sbin/ip route add 0.0.0.0/0 via 192.168.xxxx.xxxx
    RTNETLINK answers: File exists
    Sun Jan  5 14:31:56 2014 ERROR: Linux route add command failed: external program exited with error status: 2
    So the route gets not set up correctly. Is it because of connman-vpnd running?
    I have connman.service and connman-vpn.service running, both default. Everthing else is default as well excepting dev mode. Is your Sailfish up-to-date and did you do pkcon reftesh?

    It might also be your config or the way it's formatted. Is it confirmed to be working?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Matti | # 5 | 2014-01-05, 16:46 | Report

    Yes, my Sailfish is up-to-date and i did a pkcon refresh. The VPN connection works, only the route is not set correctly.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nieldk | # 6 | 2014-01-05, 17:09 | Report

    Originally Posted by Matti View Post
    I always get:
    Code:
    Sun Jan  5 14:31:56 2014 /sbin/ip route add 0.0.0.0/0 via 192.168.xxxx.xxxx
    RTNETLINK answers: File exists
    Sun Jan  5 14:31:56 2014 ERROR: Linux route add command failed: external program exited with error status: 2
    So the route gets not set up correctly. Is it because of connman-vpnd running?
    well, the error is that the route already exists. Do you use static IP ?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Matti | # 7 | 2014-01-05, 18:37 | Report

    Originally Posted by nieldk View Post
    well, the error is that the route already exists. Do you use static IP ?
    no, i get my ip from the dhcp server.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ukica | # 8 | 2016-02-04, 20:36 | Report

    any idea how to instal openvpn on jolla tablet ? i get this error when trying to install from terminal:

    Fatal error: File './core/i486/openvpn-2.3.6-1.4.1.i486.rpm' not found on medium 'https://releases.jolla.com/releases/2.0.1.7/jolla/i486/'

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Markkyboy | # 9 | 2016-02-05, 01:24 | Report

    The output you show (fatal error) suggests (to me) that openvpn is not available for the tablet, yet...I could be wrong, alternatively have a look here; https://openrepos.net/content/korppi/securefishnet

    The developer is offering versions for tablet and from the write up, says it uses/downloads openvpn anyway, so I guess this is a Sailfishy UI for managing/using openvpn.

    Regards,

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ukica | # 10 | 2016-02-05, 08:25 | Report

    thanks I'll try that.. but based on the description it also installs openvpn from repository so not really sure if it works

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout