Active Topics

 


Reply
Thread Tools
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#1
Since some of you might be interested in this.. here's a little HowTo

In order to automatically connect to a VPN when you connect your N9(50) to a wifi network you need to...

1.) install VPN9C (graphical frontend for vpnc on meego harmattan)

you can get it form the store.
(note that with vpnc you can only connect to VPN using IPSec)

2.) create a config file for vpnc (contains all the necesary credentials)

create a .conf file and store it somewhere
It should look somehting like this

IPSec gateway address
IPSec ID id
IPSec secret secret
Xauth username user
Xauth Password password
3.) install Profilematic and create a new rule

choose your desired wifi network as a condition for the rule

to connect to VPN use this command

sh -c "/opt/vpn9c/bin/vpnc.sh < /path/to/your/conf/file"
to disconnect from VPN once you disconnect from wifi

sh -c "/opt/vpn9c/bin/vpnc.sh stop"

have fun!

Last edited by mcbook; 2013-02-07 at 07:27. Reason: -> howto
 

The Following 2 Users Say Thank You to mcbook For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#2
you can use Profilematic for that.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#3
do you know how to start a VPN connection with VPN9C via terminal?
 
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#4
Originally Posted by mcbook View Post
do you know how to start a VPN connection with VPN9C via terminal?
Does VPN9C have a command line interface?
If so, you could integrate that to Profilemantic via bash scrips.
But I doubt VPN9C does. Although I never used it, so I am most likely wrong .
__________________
BWizz - best N9 bookmark editing tool! Check it out ->BWizz for Harmattan

LINKer - transform your N9's home view in a Desktop, give it the freedom it deserves! -> LINKer for Harmattan

QuickBar - Can't find the app you used yesterday in your overcrowded Home Screen? Want access to the QuickLaunch bar even in the home screen? QuickBar for Harmattan

If you like our work, and would like to support via PayPal : users.giulietta@gmail.com
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#5
there is an executable in /opt/vpn9c/bin but it doesnt take arguments and there are 2 scripts vpnc.sh and vpnc-script but i don't know how to feed them parameters
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#6
ok, i managed to feed vpnc the parameters (host, password, group secret,...) but it tells me that the operation is not permitted

vpnc: Error binding to source port. Try '--local-port 0'
Failed to bind to 0.0.0.0:500: Permission denied
also tried
~ $ vpnc /etc/vpnc/lrz.conf --local-port 0
sh: /etc/vpnc/vpnc-script: not found
vpnc: can't initialise tunnel interface: Operation not permitted
i wonder if this might have something to do with aegis?
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#7
devel-su ?
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#8
same thing
 
Posts: 446 | Thanked: 207 times | Joined on Sep 2012 @ Austria/Germany
#9
ok i figured it out (it's atcually quite simple)

vpnc.sh < path_to_config_file

thank you guys
 

The Following 2 Users Say Thank You to mcbook For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#10
Originally Posted by mcbook View Post
3.) install Profilematic and create a new rule

choose your desired wifi network as a condition for the rule

to connect to VPN use this command
Code:
/opt/vpn9c/bin/vpnc.sh < /path/to/your/conf/file
Good otherwise, but ProfileMatic doesn't run the command in shell at the moment. So the redirection "<" will not work unless you run it in shell like this in ProfileMatic's custom action

Code:
sh -c "/opt/vpn9c/bin/vpnc.sh < /path/to/your/conf/file"
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
Reply


 
Forum Jump


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