Ask / Submit

start Openvpn in rc.local always ask connection

asked 2014-10-27 22:44:41 +0300

Luca gravatar image

updated 2014-10-27 23:26:09 +0300

Hi all, I need to start openvpn client in background when starting phone.

At the moment the faster solution I found is to add in rc.local :

        openvpn /etc/openvpn/client.conf &

and to set rc.local executable.
It works fine after a reboot but there is a issue, If the phone has no available internet connection (or If I don't want it to connect) it appears the "connection popup" (I don't know it's name) asking me to select a network connection. This is very annoying.
I'd like to keep openvpn running in background. It by default check with a certain interval to connect so when connection goes on it can connect by itself and it can disconnect when connection goes down.
Is there a way to avoid the asking of connection for specific applications?
If no, is there an alternative to start openvpn in background?



edit retag flag offensive close delete


can't you just create RPM with a script which would just switch openvpn (start/stop), you can then just tap on app icon to switch openvpn

virgi26 ( 2014-10-27 22:59:54 +0300 )edit

As I told, I need it to start at boot time and run in background without "human interaction". This is also useful If I loose the phone. Passing throw my openvpn server I can reach my phone (if connected to a network) wherever it is...

Luca ( 2014-10-27 23:05:44 +0300 )edit

oh yes... i meant it just as an alternative=)

virgi26 ( 2014-10-27 23:14:05 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-10-28 07:15:19 +0300

Nieldk gravatar image

use a systemd service, that executes after network is ready. More info is here.

edit flag offensive delete publish link more


thanks, I'll try.

Luca ( 2014-10-28 08:36:44 +0300 )edit

You are free to try my new build of openvpn (you may have a look also at the services there) It should create the necessary systemd scripts, so only minor modifications will be needed.

Nieldk ( 2014-10-28 09:13:09 +0300 )edit

Hi Nieldk, can you please explain the main differences between Jolla openvpn package and your?

Luca ( 2014-10-28 09:58:31 +0300 )edit

Newer version (latest 2.3.4) and systemd scripts. Otherwise, I dont think much of a difference. You can probably use Jolla and create the systemd scripts manually, alltough, it seems at least Jollas is build without the systemd option for ask-password (which You probably dont need)

Nieldk ( 2014-10-28 10:06:17 +0300 )edit

Ok, thanks. I think systemd script should be what I need. I'm just trying...

Luca ( 2014-10-28 10:07:53 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2014-10-27 22:44:41 +0300

Seen: 756 times

Last updated: Oct 28 '14