![]() |
Openvpn Applet
1 Attachment(s)
I have made a small desktop applet for controlling openvpn connections. Get it from maemo Extras repository
Features: - Import openvpn settings through gui - Needs only standard openvpn configuration files, no extra configuration - Supports multiple connections - Supports username and password authentication |
Re: Openvpn Applet
How does it compare to vpnc-gui ?
|
Re: Openvpn Applet
Well as far as I know vpnc-gui doesn't do openvpn. And openvpn-applet is implemented as desktop plugin.
|
Re: Openvpn Applet
I made minor changes to openvpn-applet. New release is available from garage.
changes: 'sudo kill' is not required any more. /etc/init.d/openvpn is automatically added to sudoers file. bug related to zombie processes is fixed. |
Re: Openvpn Applet
Great addition... OpenVPN is my VPN of choice, and so far manually running the script was gettig boring... However, when I use the applet, I am able to define and import my vpn files, but when I go to Test or connect, there are no VPNs on the list...
Now if we can get rtcomm to see the VPNs :-) |
Re: Openvpn Applet
Just released 0.3.2 with better import.
what is your configuration file name? It has to be .conf. Also .ovpn should work in theory, but I haven't tested so it is very likely that doesn't work. |
Re: Openvpn Applet
Aha! I was trying with the .ovpn file... let me try with the .conf file...
Works, but I can't enter the password for the certificate... Let me see how to get around that... |
Re: Openvpn Applet
OK, password thing is also not so much tested. Does you config contain auth-user-pass, askpass or something else authentication related?
edit: openvpn-applet asks passwors only if condig contains askpass, and username and password only if config contains auth-user-pass |
Re: Openvpn Applet
Done! ... Created the password file in the /etc/openvpn directory...
included askpass /etc/openvpn/password in my .conf file and Voila! Working as a charm! Thanks a lot! |
Re: Openvpn Applet
Now checking if the sofia-sip (or Telepathy or mission control or ...) can see the tun device for the SIP stack :-)
|
Re: Openvpn Applet
Nope, still have to manually set the good ol' mc-account with the tun0 address ....
|
Re: Openvpn Applet
Are you trying to get built-in SIP client to talk through tun0?
I have done something like that with Code:
redirect-gateway def1 |
Re: Openvpn Applet
I tried the redirect gateway a while ago and could not get the built-in client to connect to my Asterisk server when the openvpn was up... The only way that I could get it to work is with the mc-account set sip0 string:local-ip-address= $tun0_ip....
|
Re: Openvpn Applet
I was using only google talk, so there could be a difference. If you didn't set nameserver, that could also block sip?
With up script you can anyway run anything when openvpn connection starts |
Re: Openvpn Applet
A while ago I reported bug 1860 in bugzilla... some of the nokia guys commented that the SIP stack is not currently aware of the tun0 interface going up/down, so the workaround that I found (here in the forums) was to manually assign the openvpn address to just the SIP account... Basically what I do is connect to the Openvpn server @ my office and log into my asterisk account with the N810 when out of the office... When I am @ the office i just log into the wlan and connect directly to Asterisk (192.168.x.x)... So I don't need to set the nameservers from the VPN connection...
|
Re: Openvpn Applet
Mikkov:
Now, do the if-up and if-down scripts execute when the tun0 goes up/down? I did some testing yesterday but did not get very far... A nice addition to your applet would be a pre/post-start and pre/post-stop scripts , since I am sure that many users need to do stuff before and after the vpn is up/down just related to the VPN tunnel :-) Anyways, your applet removed a bunch of steps on setting up my SIP connection to the office... |
Re: Openvpn Applet
Maybe there is slight misunderstanding.
Openvpn has up and down parameters which can run any command when tun device is opened and closed Quote:
|
Re: Openvpn Applet
:-) Yeap, seems like there is... let me get into those and will comment on the results!
|
Re: Openvpn Applet
Great! using the up and down parameters from openvpn and borrowing from jimhoy's scripts, I was able to get it working !
Here are Jimhoy's scripts... http://www.internettablettalk.com/fo...=rtcomm&page=3 I used this part for the up: #!/bin/sh sleep 5 VPN_INT="tun0" VPN_IP=`ifconfig $VPN_INT 2> /dev/null | sed -n 's/.*inet[adr: ]*\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/p'` if [ -n "$VPN_IP" ]; then mc-account set sip0 string:local-ip-address=$VPN_IP fi And a similar one for the down ! Excellent! |
Re: Openvpn Applet
Maybe a dumb question but where is the tun/tap device?
I imported a ovpn file that I use on my laptop. Both 'test' and connect appears to work. However, there does not appear to be a tun or tap 'device'. If I type 'ifconfig' there is only lo and wlan0. 'route' does not show anything new. I am running the latest diablo. I do not see a tun.ko module either. (unless is is built into the kernel) Any ideas? |
Re: Openvpn Applet
Without seeing your config or log I guess that openvpn first starts but then crashes when using "Start" button.
Openvpn crashes if you have set verb 4 or higher in configuration file. Test button sets verb to 3 but start button uses what ever is set in configuration. Maybe I should address this problem in the next version. If verb values isn't your problem maybe you could post you configuration file somewhere with private data anonymised (ip addresses etc) |
Re: Openvpn Applet
How do I enter the username and password. It doesn't work for me without these two things.
|
Re: Openvpn Applet
Quote:
|
Re: Openvpn Applet
My config file uses the auth-user-pass. When I run the test, I get a message stating: "Enter Auth Username:Mon Sep 1 16:21:00 2008 ERROR: could not read Auth username from stdin" and then it exits.
|
Re: Openvpn Applet
do you have version 0.3.3? It should work.
Is there anything else on the line with auth-user-pass? |
Re: Openvpn Applet
Yes, I have version 0.3.3-1. The only other thing that it says is "OpenVPN 2.0.9 arm-unknown-linux-gnueabi [SSL] [LZO] [EPOLL] built on Jul 31 2008"
Thanks for helping me out here. I've been wracking my brain on how to get this to work even before you came out with this applet. I got it to work just fin on my Ubuntu laptop but this is more of a challenge. |
Re: Openvpn Applet
Does it work if you start openvpn from console? start it with "/usr/sbin/openvpn /etc/openvpn/your_config"
|
Re: Openvpn Applet
Version 0.3.4 should fix problems with usernames and passwords.
|
Re: Openvpn Applet
Quote:
When I get the message that it can't read from "stdin", what is that? Can I edit this file? Where is it located? Is there a problem with the LZO option? |
Re: Openvpn Applet
Configuration files are in /etc/openvpn. You have imported the file there, so you should have the "source" file. You can edit the source file and import it again. Or you can edit file directly from command line as root.
I can't reproduce you problem, so I would need to see your configuration file in order to fix the problem. You can edit ip-address and other sensitive information out from the file. |
Re: Openvpn Applet
1 Attachment(s)
I've attached a copy of what my *.conf file looks like. I just edited out the sensitive info.
|
Re: Openvpn Applet
Seems to work for me. You could try to disable openvpn-applet and then enable it (or reboot).
Home applets don't seem to automatically restart after updating. I have to see if there is something that I could do about it for the next update. |
Re: Openvpn Applet
Quote:
|
Re: Openvpn Applet
Why does the openvpn-applet work when i choose open option>test but not when i click client>start on n810 (assuming my config is client.conf)
I have been struggling for days to make it work. The open option>test works but you cannot leave the openvpn-applet debug window, apparently the window is modal. Thus, you cannot do anything on the tablet while the debug window is open. However, I can ping the vpn ip from another computer which shows the tunnel is up. Even when I run it from the xterm /etc/init.d/openvpn start the vpn fails (FAILED) When I ran openvpn --config /etc/openvpn/client.conf, I get Assertion Failed error message. It seems vpn only works with the openvpn-applet option test mode. Hope you could help me. Thanks in advance, |
Re: Openvpn Applet
mikkov, please disregard my post. While browsing the thread, I stumbled on post #21 at 08-31-2008, 01:45 AM where you suggested to get rid of the verb > 3.
which i did. Now it is working. Thanks to this wonderful thread. I have my openvpn working now. |
Re: Openvpn Applet
Please forgive a newbie (both in N8x0 and OpenVPN use), but can I somehow make the applet remember the login and password for the OpenVPN connection?
I have imported the configuration I used in Tunnelblik and the CA cert file and when I enter the login and password at the prompt I get the connection, but is it possible to script the login and password somewhere so I wouldn't have to type them all the time? I'm not in control of my password for OpenVPN and it's a very long sequence with digits and upper case symbols, there's no way I can remember it. thanks! |
Re: Openvpn Applet
This is a little bit late answer but you can define password in openvpn configuration file:
Quote:
see http://openvpn.net/index.php/documen...x-manpage.html |
Re: Openvpn Applet
Mikko,
thanks that worked fine. I've had the CA cert and the UP filenames in double-quotes, as soon as I removed them it just worked. PS. Also thanks for porting FreeCIV, BOS Wars :). |
Re: Openvpn Applet
It won't import the configuration.
openVPN works from the CLI just fine, but it seems the applet can't handle the configuration. The applet parses the config file, and automatically populates the filenames for the certificates (although it fails to grab the ta.key). Then I tap "import selected" and it just brings me to an empty dialog box, with no indication about what the problem is. This is the config file I'm feeding it: Code:
float |
Thanks for the report. I will try to investigate this problem later.
Until I fix the problem you can copy configuration files directly to /etc/openvpn directory. Applet should see the .conf or .ovpn file from there. |
All times are GMT. The time now is 23:45. |
vBulletin® Version 3.8.8