| OpenVPN for PocketPC forum http://ovpn.sq7ro.net/ovpnforum/ |
|
| smartphone installation (T-mobile SDA Music aka Qtek 8100) http://ovpn.sq7ro.net/ovpnforum/viewtopic.php?f=4&t=84 |
Page 2 of 2 |
| Author: | jockyw2001 [ Mon Jul 02, 2007 2:57 pm ] |
| Post subject: | |
Well, I have this shortcut: Code: 222#"\Storage Card\Program Files\OpenVPN\openvpn.exe" --config "\Storage Card\Program Files\OpenVPN\config\smartphone.ovpn" --service openvpn_exit_1 --management 127.0.0.1 10000 --log "\Storage Card\Program Files\OpenVPN\log\" It connects fine and PIE and other apps work fine, but doesn't write a log and 'ovpnend.exe' doesn't release the TAP device. When I change it to: Code: 232#"\Storage Card\Program Files\OpenVPN\openvpn.exe" --config "\\Storage Card\\Program Files\\OpenVPN\\config\\smartphone.ovpn" --service openvpn_exit_1 --management 127.0.0.1 10000 --log "\\Storage Card\\Program Files\\OpenVPN\\log\\"
then it doesn't connect at all and still doesn't write a log and TAP device remains in state available. Seems the double slash in shortcuts isn't needed, except for sourcecode and config files. |
|
| Author: | jockyw2001 [ Wed Jul 04, 2007 6:07 pm ] |
| Post subject: | |
By adding the proper lines in the client config I can now log and telnet into the management interface. However, unfortunately in the management interface there is a textbox which doesn't react on the 'Enter' key - Is there a trick for sending enter? - Suppose I can send enter, what's the command to shutdown the client and return the TAP interface to available? - What is the cmdline for using Windows Connection Manager for any connection and exclusive? Update1: conmgr "auto" 1 UPDATE2: Except for the 'Enter' prob in the mgt. iface, it finally all works on my HTC S710 Smartphone. When I click the button 'Signal Stop All' (either with fakecursor or with the d-pad) it kills the connection and returns TAP state to available. If I connect OpenVPN via wifi, then the Wi-Fi SSID changes to "TAP DEVICE 1". In my config I have following lines: Code: #explicit Windows Connection Manager provider selection; like what is on
#the Settings 2 tab, but can be set here in the config file. Use either #the provider name or GUID (if you know it). The 1 indicates 'exclusive'. conmgr "auto" 1 # Path to log file log "\\Storage Card\\Program Files\\OpenVPN\\log\\client.log" # Management interface management 127.0.0.1 10000 # Service parameter to kill the client service openvpn_exit_1 Tomorrow I'll put the OpenVPN for Smartphone files together. Thanks ziggurat29 for your brilliant work |
|
| Author: | jockyw2001 [ Fri Jul 06, 2007 3:27 pm ] |
| Post subject: | |
I managed to install and run OpenVPN for PPC on my S710 smartphone. I'm sure it will also work on other WM5/6 smartphones. Here are the steps to install: 1. Make sure your device is unlocked, otherwise unlock it with Microsoft Security Manager 2. Unzip the attached .zip and copy the OpenVPN directory to \Storage Card\Program Files (you can choose another path but then you will have to modify two shortcuts in \Windows\Start Menu 3. Copy the Windows directory to \ (don't worry, it only adds two files in \Windows and two shortcuts in \Windows\Start Menu) 4. Copy the two registry files form the Registry directory to your device, e.g. to \My Documents and register them. To easily do that, I recommend Resco Registry editor) To use OpenVPN you must of course have an OpenVPN server where you can connect to. Furthermore you need to create a config file and save it as "smartphone.ovpn" to \Storage Card\Program Files\OpenVPN\config I have put there an example file which contains a line to write a log file "client.log" to \Storage Card\Program Files\OpenVPN\log. The log file helps you to debug any connection issues. If you want to connect to your OpenVPN server, first fire up your Wifi or GPRS/Edge/UMTS. Now start the OpenVPN Connection manager, return to the Home screen and start the OpenVPN client by clicking on the white icon in your Start menu (sorry, I didn't bother to create or link it with a nice icon ...). The VPN connection will be established on top of your existing data connection. I noticed that it is sometimes necessary to tweak connection settings in the browser (toggle from Internet to Work or vice versa. It requires some experimenting to get the hang of it). If you want to disconnect then click on OpenVPN Connection manager and select the VPN tab. In the bottom-right corner you can see just a little part of a button. Use the D-pad to select that button (the border line will become bold if you selected it) and click it. This will send a terminate signal to client and release the TAP network interface. My mobile operator blocks VoIP ports so I mainly use an OpenVPN connection to tunnel VoIP traffic through an Edge connection Have fun! You find the attachment in the first post of this thread: http://forum.xda-developers.com/showthread.php?t=315609 |
|
| Author: | ziggurat29 [ Sat Jul 07, 2007 12:11 am ] |
| Post subject: | |
No, thank you for your brilliant intrepidity in making it work; I know this will be very interesting to others. I noticed you included your 'secret.key' in your zip. Hopefully it's bogus. If not you may wish to generate a new one. I noticed you included the ovpncgr.exe, is it needed for the Smartphone? I think I failed to mention earlier about getting the TAP driver to load. If it's signed 'properly', it will load at boot time, but if not it will require ovpncmgr.exe to dynamically load it when that app starts up. I wonder what would happen if: * you soft-resetted your phone * you ran the vpn from your shortcut My guess is it would fail. Then, if you : * started ovpncmgr.exe, and then exited it * and tried to start from your shortcut it would succeed. That's my guess. Meaning that ovpcmgr.exe is still needed to be run once to get the driver to load. |
|
| Author: | jockyw2001 [ Sat Jul 07, 2007 8:17 am ] |
| Post subject: | |
ziggurat29 wrote: I noticed you included your 'secret.key' in your zip. Hopefully it's bogus. If not you may wish to generate a new one. no worries it's bogus Quote: I noticed you included the ovpncgr.exe, is it needed for the Smartphone? I think I failed to mention earlier about getting the TAP driver to load. If it's signed 'properly', it will load at boot time, but if not it will require ovpncmgr.exe to dynamically load it when that app starts up. I wonder what would happen if:
* you soft-resetted your phone * you ran the vpn from your shortcut My guess is it would fail. Then, if you : * started ovpncmgr.exe, and then exited it * and tried to start from your shortcut it would succeed. That's my guess. Meaning that ovpcmgr.exe is still needed to be run once to get the driver to load. Perfect guesses. When running openvpn.exe immediate after soft reset the error reported on the last line of the log is: "Cannot acquire Windows Connection Manager provider, error 0x0000002a" and as you suspected after running ovpncmgr.exe first it will work just fine. |
|
| Author: | jockyw2001 [ Mon Jul 09, 2007 9:10 am ] |
| Post subject: | |
ziggurat29: It would be nice if you would put the file in the files section of your web site (http://ovpnppc.ziggurat29.com/ovpnppc-files.htm) I'm sure more people will find it then Thx! |
|
| Author: | cmore [ Fri Jul 27, 2007 8:52 pm ] |
| Post subject: | |
ziggurat29, jockyw2001: I have to say you guys are awesome, thanks for everything. I've gotten openvpn running solid on my Motorola Q smartphone using jockyw2001's files. I have noticed similiar results regarding toggling the network connection back and forth between "The Internet" and "Work". I also report that I have poor luck of being able to get the config manager window visible once it starts. To simplify things I've built a mortscript that will toggle on and off openvpn making that network connection change as well. I do have a question though. Could I script the functionality of the ovpncmgr, avoiding the gui all together? Zigguratt29, I recall reading something about you said the ovpncmgr ultimately calls command line arguments. What would those be? ***Start Script*** #============================================== #Openvpn toggle script # #This script is a MortScript to start/stop OpenVPN #Mortscript can be obtained from #http://www.sto-helit.de/index.php?module=page&entry=ms_overview&action=view #============================================== If (ProcExists("openvpn.exe")) #Closing things down #Kill off processes if (ProcExists("ovpncmgr.exe")) Kill "ovpncmgr.exe" EndIf Kill "openvpn.exe" #Configures network connections for 'The Internet' RegWriteBinary("HKCU","Software\Microsoft\Windows\CurrentVersion\Internet Settings","ConnMgrExternalPath","44F16E43FBB46348A0418F905A62C572") If (ProcExists("openvpn.exe")=0) message "Openvpn Disabled" Else message "Unable To Close OpenVPN" EndIf Else #Starting things up #Start Openvpn config manager if it's not running - this will load the tap driver Run "\Storage Card\Program Files\OpenVPN\ovpncmgr.exe" WaitFor("OpenVPN Connection Manager",8) Minimize("OpenVPN Connection Manager") #Start Openvpn Run "\Storage Card\Program Files\OpenVPN\openvpn.exe","--config ""\Storage Card\Program Files\OpenVPN\config\SMARTPHONE.ovpn""" #Configure network connection to 'Work' mode RegWriteBinary("HKCU","Software\Microsoft\Windows\CurrentVersion\Internet Settings","ConnMgrExternalPath","882918A1730D9E4387AD2A5B369F808B") If (ProcExists("openvpn.exe")) message "OpenVPN Enabled" Else message "Unable To Load OpenVPN" EndIf EndIf ***End Script*** |
|
| Author: | ziggurat29 [ Sun Jul 29, 2007 5:10 pm ] |
| Post subject: | |
Yes, you could conceivably get rid of ovpncmgr.exe altogether. There are two critical things it does: 1) start the TAP adapters if needed. This needs to be done once, so you could run it once and then exit it. This has to do with code signing and applies to all WM5 and up devices. 2) stop any running vpn. this would otherwise be tricky, since openvpn.exe doesn't have any visible presence to kill it. For item 1, you can run ovpncmgr.exe once, and then exit it. Preferably around startup time. For item 2, there is a non-documented tool: http://www.ovpnppc.ziggurat29.com/files/ovpnend.exe This will signal a named event specified on it's command line, and then exit. The default is 'openvpn_exit_1' (without quotes). If you start openvpn.exe with the '--service openvpn_exit_1' command line parameter, then running ovpnend.exe will cause the vpn to terminate any connections and exit. Conceivably, a similar tool too could be produced to start the TAP adapters, thereby avoiding the need for running ovpncmgr at all. As for command line parameters sent to openvpn.exe, there are several. Keep in mind all these parameters can be specified in the config file instead, thereby simplifying your work (then you only have to provide the config file name to the openvpn.exe). --config - to specify the config file --service - to specify the exit named event used by 'signal stop all' --log - for logging --management - for the management connection that provides fancy status info, but also for password dialogs. --conmgr - this is a pocketpc only option for dealing with windows connection manager. it is documented in the sample.ovpn file. hopefully you will never need it. Also, note that if your various key files are encrypted (i.e. require a password) you will have some trouble unless you write a more full gui (since you can't provide the password dialog, and you won't have a means of sending it). This is typically done via the management interface. |
|
| Author: | antony++ [ Tue Sep 11, 2007 11:32 am ] |
| Post subject: | |
First of all, thanks for the effort! I have an S710 (HTC Vox). I installed openvpn as supplied by jockyw2001 and used the mortscript by cmore. It worked ok. Then, according to ziggurat29's instructions I broke the mortscript into two scripts: ovpnsetup.mscr which I link from /Windows/Start Up/ Code: # Start OpenVPN config manager - this will load the tap driver
Run "\Storage Card\OpenVPN\ovpncmgr.exe" WaitFor("OpenVPN Connection Manager", 8) Close("OpenVPN Connection Manager") and ovpntoggle.mscr which I use to start/stop the vpn (the same script as cmore's, without the connection manager stuff). It works fine. I also tried stopping openvpn instances with ovpnend.exe, but it would do anything. A simpler executable replacing ovpncmgr that will initialize the driver and exit would be extremely usefull, as would be a tun/tap configurator (but if you can write openvpn configuration files, I guess you are already at the level of playing around with the registry Keep on the good work! |
|
| Author: | Koxx [ Wed Sep 19, 2007 8:04 pm ] |
| Post subject: | |
Hi, it works for me (i600 & WM6). It works with IE... but no way to receive email through POP3, or to use messenger. How do you redirect all data to this new connexion ? I use this config : dev tun persist-tun persist-key conmgr "auto" 1 remote xxxxxx.dyndns.org log "\\Storage Card\\Program Files\\OpenVPN\\config\\client.log" management 127.0.0.1 10000 service openvpn_exit_1 secret "\\Storage Card\\Program Files\\OpenVPN\\config\\secret.key" proto tcp-client port 443 ping 15 ping-restart 120 no-replay verb 5 ifconfig 192.168.200.2 192.168.200.1 route-gateway 192.168.200.1 redirect-gateway dhcp-option DNS 208.67.222.222 http-proxy 193.253.141.80 80 Is there something wrong ? |
|
| Author: | kgk [ Fri Dec 28, 2007 11:41 am ] |
| Post subject: | |
Could someone please upload the OpenVPN-Smartphone.zip file somewhere else? The http://forum.xda-developers.com/showthread.php?t=315609 link is down atm. |
|
| Author: | ric51 [ Thu Jul 10, 2008 10:30 pm ] |
| Post subject: | Re: smartphone installation (T-mobile SDA Music aka Qtek 8100) |
Hi, Great job for this program. I use your latest version RC8. I want to create 2 shortcuts in the start menu of my diamond (wm 6.1) to start and stop my vpn. The start shortcut is ok : Code: 98#"\Program Files\OpenVPN\openvpn.exe" --config "\Program Files\OpenVPN\config\Sfr-pda-routeur.ovpn" The stop shortcut is not : Code: 61#"\Program Files\OpenVPN\openvpn.exe" --service openvpn_exit_1 I tried with ovpnend.exe too but i can't stop the vpn. Here is my config file "Sfr-pda-routeur.ovpn" : Code: dev tap proto tcp-client remote 82.66.179.200 443 http-proxy-retry http-proxy 195.115.25.129 8080 port 443 secret "\\Program Files\\OpenVPN\\config\\static.key" conmgr "WAP SFR" 1 log "\\Program Files\\OpenVPN\\log\\Diamond.log" service openvpn_exit_1 comp-lzo Could you help me ? Best regards |
|
| Author: | prodigy7 [ Thu Aug 14, 2008 8:50 am ] |
| Post subject: | Re: smartphone installation (T-mobile SDA Music aka Qtek 8100) |
Same Issue here too... OpenVPN can started, it also start a connection but no status or anything else is shown in the gui. I think, it's a problem with wm 6.1 - with my old wm 6.0 device there are no problems. |
|
| Author: | jim9k [ Mon Jan 26, 2009 3:56 am ] |
| Post subject: | Re: smartphone installation (T-mobile SDA Music aka Qtek 8100) |
I've built a GUI for smartphone and have been using it on my BJ2 for a few weeks now. I think it's stable enough to unleash on the rest of the world. Info is here: http://www.zoan.net/wp/?cat=15 Let me know if it works for you. I check my blog more often than this forum, so comments there will probably be heard more quickly. Jim |
|
| Page 2 of 2 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|