Reply
Thread Tools
Posts: 28 | Thanked: 104 times | Joined on Oct 2010
#1
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:
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
to
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.
 

The Following 12 Users Say Thank You to Fawz For This Useful Post:
Posts: 46 | Thanked: 28 times | Joined on Jan 2012 @ London / Porto
#2
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 :-)
 
Posts: 9 | Thanked: 9 times | Joined on Nov 2009 @ Berlin/Germany
#3
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?
 
Posts: 28 | Thanked: 104 times | Joined on Oct 2010
#4
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?
 
Posts: 9 | Thanked: 9 times | Joined on Nov 2009 @ Berlin/Germany
#5
Yes, my Sailfish is up-to-date and i did a pkcon refresh. The VPN connection works, only the route is not set correctly.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#6
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 ?
 
Posts: 9 | Thanked: 9 times | Joined on Nov 2009 @ Berlin/Germany
#7
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.
 
Posts: 28 | Thanked: 15 times | Joined on Nov 2015
#8
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/'
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#9
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,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Posts: 28 | Thanked: 15 times | Joined on Nov 2015
#10
thanks I'll try that.. but based on the description it also installs openvpn from repository so not really sure if it works
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:53.