Active Topics

 


Reply
Thread Tools
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#1
Hi!
How can I start openvpn automatically, when a connection was
established? Best would be a connection-specific script to run.
I want to start openvpn on any connection, but not when connected
to my home lan. At the moment I am using the openvpn-gui, but
I always have to do that manually.
__________________
May the force be with us!
 
Viqsi's Avatar
Posts: 115 | Thanked: 136 times | Joined on Mar 2008 @ Central Ohio
#2
Presumably something with dbus-scripts would allow this, but beyond that I'm not sure where to begin.
 
Posts: 151 | Thanked: 93 times | Joined on Sep 2009 @ sofia, bulgaria
#3
I've put a script in /etc/network/if-up.d that is doing this, without dbus staff.
 
Posts: 5,335 | Thanked: 8,187 times | Joined on Mar 2007 @ Pennsylvania, USA
#4
Originally Posted by mase View Post
How can I start openvpn automatically, when a connection was established? Best would be a connection-specific script to run. I want to start openvpn on any connection, but not when connected
to my home lan. At the moment I am using the openvpn-gui, but
I always have to do that manually.
You might try writing a script for placement in /etc/network/if-up.d/. Compare the output of
Code:
/usr/bin/gconftool -g \
"/system/osso/connectivity/IAP/$ICD_CONNECTION_ID/name"
against your home WiFi network's name and launch OpenVPN for any connection that doesn't match.
__________________
maemo.org profile
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#5
I know /etc/ppp/ip-up.d from my Debian system. This doesn't
exist in Maemo. Does /etc/network/if-up.d include the dialup
network?
__________________
May the force be with us!
 
Posts: 5,335 | Thanked: 8,187 times | Joined on Mar 2007 @ Pennsylvania, USA
#6
Originally Posted by mase View Post
I know /etc/ppp/ip-up.d from my Debian system. This doesn't
exist in Maemo. Does /etc/network/if-up.d include the dialup
network?
By dialup, do you mean GPRS? If so, yes, the scripts in /etc/network/if-up.d are run for those connections. In fact, if you look at the existing scripts there, you'll notice blocks such as:
Code:
if [ "$ICD_CONNECTION_TYPE" != GPRS ]; then
    exit 0
fi
__________________
maemo.org profile
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#7
I did it this way:
http://talk.maemo.org/showpost.php?p=572440&postcount=2
__________________
May the force be with us!
 
Posts: 306 | Thanked: 106 times | Joined on Feb 2010
#8
The init script sends the openvpn log to syslog. I would rather use the openvpn applet for graphical feedback as requested here.
__________________
------------------------------------------------------------------
Voice choppy on sip calls
Please vote for bug number 10388
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#9
Yes, but the question stays. Can I control the applet via commandline?
__________________
May the force be with us!
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:35.