maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   openvpn connection problems (https://talk.maemo.org/showthread.php?t=80976)

ticktock666 2011-12-19 08:12

openvpn connection problems
 
Hi, I've been trying to use openvpn & applet for a while now with no luck, I've tried everything mentioned in this thread : http://talk.maemo.org/showthread.php?t=37559 but to no avail, so I hope someone can help me out here .

I have Openvpn running on a remote server, successfully connected to it using openvpn-gui on my windows machine, I've installed openvpn/applet on the n900, downloaded the files I needed from the server (linux server, downloaded files through gftp directly to the n900), now when I import the client.ovpn using the applet it detects all the files (key,cert...etc) but if I try to connect I get a "starting connection" message and nothing happens (applet shows no active connections), if I try the test button sometimes it shows a white log window that stays empty and sometimes even the window doesn't show up .

I've tried copy/paste the contents of the files into new leafpad files and saved them on the n900 (to avoid unicode problems), removed all lines with # from the client.ovpn file, still no luck

when running the follwing command in terminal :
openvpn --connect client.ovpn

I get the following error :
options error : unrecognized option or missing parameter(s) in [CMD-LINE]:1: connect (2.1.1)

Any help would be much appreciated, atm I use ssh/tsocks combo to surf the net, but it's a bit too much everytime I need to connect, since I can't use direct internet in my country atm due to fear of bigBrother monitoring everything (living in S.Y.R.I.A) and openvpn would really simplify things for me

p.s : some nokia repos are blocked here, so the first time i tried to install openvpn through app manager it wasn't able to find "bash" and refused to install, I fired FAPman with tsocks through SSH, removed openvpn, and reinstalled it with bash 3, not sure if this is of any relation, also in the /etc/openvpn directory i found a maemo-update-resolvconf file that starts with #!/bin/bash , could this be of any relation to my problem ?

Thanks in advance

xes 2011-12-19 22:50

Re: openvpn connection problems
 
1 Attachment(s)
Maybe that you have some parameter in the client.ovpn that the version installed cannot understand?

I have compiled the latest openvpn 2.2.1 with the same parameters of previous version present in the N900's repo.

If you wanna try, here it is.. ;)

ticktock666 2011-12-20 21:50

Re: openvpn connection problems
 
here are the contents of my .ovpn file, i've checked it against other files posted by users here and other forums and couldn't find any difference, but maybe i missed something :
client
dev tun
remote servername.com 1194
proto udp
resolv-retry infinite
nobind
;user nobody
;group nogroup
persist-key
persist-tun
;mute-replay-warnings
ca ca.crt
cert ticktock666.crt
key ticktock666.key
tls-auth tls-auth.key 1
ns-cert-type server
comp-lzo
verb 9
mute 20

i will test your openvpn version, i'm using the one from the repos atm

eidt : i've downloaded the zip file and extracted it on n900 and got a file named "openvpn" , renamed it to openvpn.deb and tried to open it with app manager but it says file is corrupted and won't install ? what am i doing wrong ?

xes 2011-12-21 00:52

Re: openvpn connection problems
 
This zip contains the binary program of openvpn 2.2.1. Nothing more, nothing less.

Unzip it and run ./openvpn --config client.ovpn.

Verified and perfectly working.

coredumb 2011-12-21 05:56

Re: openvpn connection problems
 
Quote:

Originally Posted by ticktock666 (Post 1139337)
when running the follwing command in terminal :
openvpn --connect client.ovpn

I get the following error :
options error : unrecognized option or missing parameter(s) in [CMD-LINE]:1: connect (2.1.1)

i think the proper command is:
Code:

openvpn --config client.ovpn

xes 2011-12-21 08:44

Re: openvpn connection problems
 
Yes thanks!...Just corrected the post
(i was almost sleeping...:rolleyes:..)

Quote:

Originally Posted by coredumb (Post 1140274)
i think the proper command is:
Code:

openvpn --config client.ovpn


ticktock666 2011-12-21 09:16

Re: openvpn connection problems
 
ok, I've extracted the zip file, navigated to the directory with the "openvpn" file in terminal and ran the command, now I get a new error message :
options error : in [CMD-LINE]:1: error opening configuration file client.ovpn

how can I replace the openvpn version on the n900 (2.1.1) with the one you provided ? can I copy the binay file from zip somewhere to directly overwrite the older version ?

I've noticed the (2.1.1)

Estel 2011-12-22 04:02

Re: openvpn connection problems
 
Code:

which openvpn
(as root, just to be sure) may help. But, I would suspect, it is in /usr/bin/, or /usr/sbin/.

/Estel

xes 2011-12-22 08:53

Re: openvpn connection problems
 
@ticktock666

to find where is the installed openvpn binary:
dpkg -L openvpn | grep bin

If you can't find it, put the binary i attached previously in the same folder containing certicates and config file ( for example client.ovpn) and run
./openvpn --config client.ovpn

ticktock666 2011-12-23 14:41

Re: openvpn connection problems
 
finally got a response from openvpn, i removed all connections from the applet and delete the files from /etc/openvpn , then navigated to the folder where i kept the my .ovpn file through terminal and ran the command : openvpn --config client.ovpn , this got ovpn running in terminal , but it would not connect due to some "tls handshake error", could this be due to some isp block ? should i test with other udp/tcp ports ?

here's the log from running openvpn in terminal :
Code:

Nokia-N900:/home/user/MyDocs/unseen/vpn# openvpn --config client.ovpn
Fri Dec 23 16:22:55 2011 OpenVPN 2.2.0 arm-linux-gnueabi [SSL] [LZO2] [EPOLL] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Aug 20 2011
Fri Dec 23 16:22:55 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Dec 23 16:22:55 2011 WARNING: file 'keys/ticktock666.key' is group or others accessible
Fri Dec 23 16:22:55 2011 WARNING: file 'keys/tls-auth.key' is group or others accessible
Fri Dec 23 16:22:55 2011 Control Channel Authentication: using 'keys/tls-auth.key' as a OpenVPN static key file
Fri Dec 23 16:22:55 2011 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Dec 23 16:22:55 2011 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Dec 23 16:22:55 2011 LZO compression initialized
Fri Dec 23 16:22:55 2011 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Fri Dec 23 16:22:55 2011 Socket Buffers: R=[65536->131072] S=[16384->131072]
Fri Dec 23 16:22:55 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Dec 23 16:22:55 2011 Local Options hash (VER=V4): '504e774e'
Fri Dec 23 16:22:55 2011 Expected Remote Options hash (VER=V4): '14168603'
Fri Dec 23 16:22:55 2011 UDPv4 link local: [undef]
Fri Dec 23 16:22:55 2011 UDPv4 link remote: [AF_INET][serverip]:1194
Fri Dec 23 16:23:55 2011 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Fri Dec 23 16:23:55 2011 TLS Error: TLS handshake failed
Fri Dec 23 16:23:55 2011 TCP/UDP: Closing socket
Fri Dec 23 16:23:55 2011 SIGUSR1[soft,tls-error] received, process restarting
Fri Dec 23 16:23:55 2011 Restart pause, 2 second(s)
Fri Dec 23 16:23:57 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Dec 23 16:23:57 2011 Re-using SSL/TLS context
Fri Dec 23 16:23:57 2011 LZO compression initialized
Fri Dec 23 16:23:57 2011 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Fri Dec 23 16:23:57 2011 Socket Buffers: R=[65536->131072] S=[16384->131072]
Fri Dec 23 16:23:57 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Dec 23 16:23:57 2011 Local Options hash (VER=V4): '504e774e'
Fri Dec 23 16:23:57 2011 Expected Remote Options hash (VER=V4): '14168603'
Fri Dec 23 16:23:57 2011 UDPv4 link local: [undef]
Fri Dec 23 16:23:57 2011 UDPv4 link remote: [AF_INET][serverip]:1194
Fri Dec 23 16:24:57 2011 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Fri Dec 23 16:24:57 2011 TLS Error: TLS handshake failed
Fri Dec 23 16:24:57 2011 TCP/UDP: Closing socket
Fri Dec 23 16:24:57 2011 SIGUSR1[soft,tls-error] received, process restarting
Fri Dec 23 16:24:57 2011 Restart pause, 2 second(s)
Fri Dec 23 16:24:59 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Dec 23 16:24:59 2011 Re-using SSL/TLS context
Fri Dec 23 16:24:59 2011 LZO compression initialized
Fri Dec 23 16:24:59 2011 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Fri Dec 23 16:24:59 2011 Socket Buffers: R=[65536->131072] S=[16384->131072]
Fri Dec 23 16:24:59 2011 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Dec 23 16:24:59 2011 Local Options hash (VER=V4): '504e774e'
Fri Dec 23 16:24:59 2011 Expected Remote Options hash (VER=V4): '14168603'
Fri Dec 23 16:24:59 2011 UDPv4 link local: [undef]
Fri Dec 23 16:24:59 2011 UDPv4 link remote: [AF_INET][serverip]:1194
^CFri Dec 23 16:25:01 2011 event_wait : Interrupted system call (code=4)
Fri Dec 23 16:25:01 2011 TCP/UDP: Closing socket
Fri Dec 23 16:25:01 2011 SIGINT[hard,] received, process exiting



All times are GMT. The time now is 02:07.

vBulletin® Version 3.8.8