[Q] Error in establishing openvpn connection on Toshiba Thrive (Android 3.2.1) - Android Q&A, Help & Troubleshooting

Hello All,
I have been searching for a solution to the below mentioned issue all over the net since last one month and finally referred to this forum by my vpn service provider 'cyberghostvpn'.
I am enclosing my config file (test.ovpn.txt), log file(log.txt) & sample password file for 'auth-user-pass' (pass.txt).
Following are the highlighted points regarding this issue :
While the same config file is working fine on my linux machine on android the same is stopping at the prompt "Enter Auth Username :". After entering username the connection sequence continues but the prompt "Enter Auth Password :" never comes like linux.
Hence my analysis is that the openvpn binary is unable to pass my the username-passowrd combination to my vpn server in the console input mode and an auth-failure control message is received shortly later terminating the connection.
If I pass the username-passord combination through the password file as 'auth-user-pass pass.txt' then also the same thing happens (an auth-failure control message is received terminating the connection).
In linux both of these methods are working successfully in establishing the connection proving that there is nothing wrong with cyberghostvpn.
One important point is though on android the openvpn binary is unable to read the config from the .ovpn file, it runs when the options are given as command line arguments as shown below and the enclosed log file is generated in this method.
# openvpn --client --ca ca.crt --cert my_user_name.crt --key my_user_name.key --remote ch.openvpn.cyberghostvpn.com 9081 ..........--tun-mtu 1500 --fragment 1300 --mssfix > log.txt
Anyone who can either help me resolving this issue or refer it to some expert developer on openvpn will be very much appreciated.
Kind regards,
kingsukm

Related

[MOD] LEAP/PEAP wifi

This mod take a couple of minutes to complete and allows for PEAP wifi connections. Requires root access and ADB knowledge.
I AM NOT RESPONSIBLE FOR ANY ISSUES YOU CREATE WITH THIS. IT IS A ROUGH GUIDE AND WORKS FOR ME. DO AT OWN RISK.
Tutorial For Adding LEAP/PEAP Wifi
1. Open Command prompt window in Windows.
2. Go to your directory that you have Android SDK in.
3. Change directory to Tools. So for eg. C:\Android\Tools
4. Type in adb devices. You should see your device. If not install ADB driver. Google it.
5. Type in adb pull /data/misc/wifi/wpa_supplicant .conf c:\wpa_supplicant.conf
6. This stores wpa_supplicant.conf on your C: drive.
7. Open file with wordpad.
8. Add the following to the files:
for PEAP add this code:
network={
ssid="Your SSID"
key_mgmt=WPA-EAP
identity="Your Username"
password="Your Password"
}
for LEAP use this:
network={
ssid="Your SSID"
scan_ssid=1
key_mgmt=IEEE8021X
auth_alg=OPEN SHARED LEAP
eap=LEAP
identity="Your Identity"
password="Your Password"
}
9. Save the file.
10. Type push c:\wpa_supplicant.conf /data/misc/wifi/wpa_supplicant .conf
11. Now the important part. If you miss this your wifi will not work after reboot.
12. Type adb shell
13. Should get # prompt.
14. Type su.
15. Type cd /data/misc/wifi
16. Type chown 1010 wpa*
17. Type chgrp 1010 wpa*
18. Close command prompt window and enjoy LEAP/PEAP wifi.
What is the difference between the two?
A question that might help the unacknowledged
EAP and LANs
EAP originated with the dial-up PPP protocol in order to support protocols beyond PAP and CHAP. For use on packet networks, EAP Over LAN (EAPOL) was created. EAPOL added new message types and allowed an Ethernet header to be prefixed onto EAP messages so they could be transmitted via Ethernet. Following are various EAP methods used mostly in wireless networks, but also in wired networks. See 802.1X, WPA and 802.11i.
EAP-TLS (EAP-Transport Layer Security)
Uses the handshake protocol in TLS, not its encryption method. Client and server authenticate each other using digital certificates. Client generates a pre-master secret key by encrypting a random number with the server's public key and sends it to the server. Both client and server use the pre-master to generate the same secret key.
EAP-TTLS (EAP-Tunneled TLS)
Like EAP-TLS above except only the server has a certificate to authenticate itself to the client first. As in EAP-TLS, a secure connection (the "tunnel") is established with secret keys, but that connection is used to continue the authentication process by authenticating the client and possibly the server again using any EAP method or legacy method such as PAP and CHAP.
PEAP (Protected EAP)
Similar to EAP-TTLS above except it does not support legacy methods. It only moves EAP frames. Windows XP natively supports PEAP.
LEAP (Light EAP, Cisco LEAP)
From Cisco, first implementation of EAP and 802.1X for wireless networks. Uses preshared keys and MS-CHAP protocol to authenticate client and server to each other. Server generates and sends session key to access point. Client computes session key independently based on data received in the CHAP challenge.
EAP-FAST
(EAP-Flexible Authentication via Secure Tunneling)
Enhancement to LEAP from Cisco that provides an encrypted tunnel to distribute preshared keys known as "Protected Access Credential" (PAC) keys. PAC keys may be continuously refreshed to prevent dictionary attacks. EAP-FAST is defined in Cisco's Cisco Compatible Extensions (see CCX).
EAP-SIM (GSM Cellphones)
For GSM phones that switch between cellular and Wi-Fi networks, depending on which is in range. The Subscriber Identity Module (SIM) smart card in the GSM phone (see GSM) contains the secret key used for challenge/response authentication and deriving session keys for encryption.
Click to expand...
Click to collapse
Source:www.pcmag.com/encyclopedia_term
thanks
Thanks for the help clarifying that for peoples.... its finally great to be able to use the WiFi at school... would be nice to implement it automatically, I can't write the code.... but if anyone would like too it would really add to the community....
Maybe I'm misunderstanding this but i know when i try to use LEAP at school, it already has options and what not for it on my phone, none of this is necessary for me
I know with my school which is (PEAP) you couldn't input a username just a password! so if you are having troubles connecting to a LEAP or PEAP connection this is a way to workaround and get it working. If you can already connect don't worry about it! this is for those who cant connect and get crappy data in class! haha
Does this work with MS-CHAP ? How do I define it?
Thanks!
MS-CHAP already works out of the box. At least I can connect at work with PEAP, MS-CHAPv2. Could be a CM 5 thing though.
Thanks for posting this! while it did not directly solve my problem, it made me redouble my efforts to get on my company's wlan with my N1. I have tried this many times over the years with various phones including UIQ3, WM6 and never got anywhere. I always assumed that there was some sort of certificate or windows domain stuff going on.
So this morning I did a wireshark trace and put my laptops drivers into debug logging to find out how my laptop connects.
A bit of googling for the stuff I found enabled me to get a working supplicant.conf on the third attempt and I am amazed!
Appear to be using WPA2 Enterprise with EAPOL LEAP with CCMP encryption on Cisco access points.
Here is the network part of my wpa_supplicant.conf in case it helps anyone:
network={
ssid="SSID"
scan_ssid=1
key_mgmt=WPA-EAP IEEE8021X
auth_alg=SHARED LEAP
group=CCMP
eap=LEAP
identity="DOMAIN\User"
password="Password"
}
maedox said:
MS-CHAP already works out of the box. At least I can connect at work with PEAP, MS-CHAPv2. Could be a CM 5 thing though.
Click to expand...
Click to collapse
Doesn't work for me on stock rom.
What works for PEAP with MSCHAPv2 in my school is:
network={
ssid="<ssid>"
scan_ssid=1
key_mgmt=IEEE8021X
eap=PEAP
identity="<userid>"
password="<password>"
phase2="auth=MSCHAPV2"
priority=2
}
(Previously posted on my blog at http://zitseng.com/archives/2729)
It works, Thanks!
There's a way of doing that without root access:
code.google.com/p/android/issues/detail?id=1871
Step 16 17
when i type
16. Type chown 1010 wpa*
17. Type chgrp 1010 wpa*
i get the error:
"no such user '1010'"
"chgrp: not found"
what is it mean?
Is there anything I may have done wrong?
tanks
Doesn't work for me for some reason. Do you think having CM6 RC3 would make a difference? Not that I could see it doing so.
I've tried a few of the above suggestions but none work for me
The worst thing is it worked fine before I updated my Nexus One to FroYo!
my current settings for the uni are:
network={
ssid="UoN-secure"
key_mgmt=WPA-EAP IEEE8021X
eap=PEAP
identity="username"
password="password"
phase2="auth=MSCHAPV2"
}
Any help would be appreciated
The problem I am having is that it will not keep the Phase 2 auth - MSCHAPV2 setting when I set it up. Every time I go back into the ssid settings (modify network) it has reverted back to "none". However the information above was pulled from the phone so it obviously is storing the MSCHAPV2 setting, just doesn't seem to be using it!
actually cm6 rc3 should have support for Leap/PEAP i have been using it for a while without this hack.... what type of connection are you trying to connect too?

WiFi not connecting at Work (home OK) on TMous HD2

Mark here.
Thanks in advance for any help offered.
Searched around here and elsewhere since last year & can't find a solution. (please don't copy whole message in reply)
Ideal solution either: 1. Able to store/save settings and password so it does not need to be entered every day (many times) or 2. Load certificate correctly.
I have a TMous HD2 running Energy ROM (Feb 2011 version)
Connects fine to home WiFi's without prompts. Also to about 10 others when traveling - no probs.
It does not connect easily to my work WiFi. I have worked out a method, but I need to re-enter settings and password many times a day. With high security p/w with various characters etc it's a real pain.
To do so, I have setup link to WLANSettings.exe on home screen. I use these settings: 1. Work (not internet), 2. WPA2/AES, 3. PEAP (not Smart card or cert). OK. Then asks for login, password (no domain needed). First time enter login etc it doesn't connect. Second time I've learned to hit OK again and after a few seconds it connects.
If I go though the 'normal' WiFi setup it asks for a Certificate. I enter the server for the cert, password as above and it will not find it. They gave me a cert file ('home grown' PEAP Authority certificate Thawte Premium Server CA) but it loads into Intermediate, not Personal and does not work. Apparently iPhone & iPad link to cert server and install it fine.
Tried:
1. I tried Odyssey (Odyssey Access Client for Windows MobileCE - Juniper Networks ). Helps, but not perfect, but it messes up my home connection. so uninstalled (updated ROM since then)
2. Tried programs to load cert. No go. (p12imprt, pfximprt; smartphoneaddcert). Various error messages - can't remember them - along the lines of not signed, not .pfx cert etc.
3. Exported cert. from PC's (WinXP) Firefox. Can't convert it to a .pfx to use the above.
Work does not support Win Mobile. So no support offered - though they've tried to help.
The settings for my mates Nokia which does work are:
PEAP and the fields are:
Personal certificate: not defined
Authority certificate: Thawte Premium Server CA User name in use: user defined User name: 'must leave blank'
Realm in use: user defined
Realm: 'must leave blank'
Allow PEAPv0: Yes
Allow PEAPv1: Yes
Allow PEAPv2: No
Under MSCHAPv2 within PEAP settings are
User name : your 'username'
Prompt password: no
Password: your 'password'
Have tried following also (rough notes):
HKEY_LOCAL_MACHINE\Comm\EAP\Extension\25.
"InvokePasswordDialog" and "InvokeUserNameDialog" value 1, switch to 0. Works till restart.
go to commMan/ menu/ settings set work & proxy or commMan/Conns/conns
changed to HKLM, gone to directory comm\EAP\extension\25. added a folder called validateservercert and added a key to this folder - DWORD. it asks me to edit the DWORD value - in value data i have added 00000000 and selected hexadecimal.
add the key [HKEY_LOCAL_MACHINE\Comm\EAP\Extension\25] and [HKEY_LOCAL_MACHINE\Comm\EAP\Extension\26]

			
				
Mmm... 'tis a difficult one.
>"Ideal solution either: 1. Able to store/save settings and password so it does not
>need to be entered every day (many times) or 2. Load certificate correctly."
Another alternative would be software to manage WiFi login - that saves passwords.
I tried Odyssey, but it messed up home connections. WiFi Monster does not do it.
Anything out there?
Mark

[Q] Android + PHP + SSL issues

Hey Everyone,
I recently downloaded and installed "PHP for Android." I created a .php file that utilizes an SSL connection with port 2195. When I tried running it, I get the following error message:
HTML:
Error:14094410:SSL routines:func(148):reason(1040) in /mnt/sdcard/sl4a/scripts/lot.php on line 19
Warning: stream_socket_client(): Failed to enable crypto in /mnt/sdcard/sl4a/scripts/lot.php on line 19
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /mnt/sdcard/sl4a/scripts/lot.php on line 19
This is my line 19:
"$apns = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);"
I researched what "reason(1040)" means, and supposedly it means that the port is closed. But what firewall is blocking it? The same exact script works when I execute it from my computer from the same wifi connection. Could it be a firewall inside the Android OS?
Any input will be greatly appreciated!!
Thanks!
Does anyone know?
Hey,
We also got that error with the iPhone Push service, and it was due to the certificate not being set correctly (actually the certificate file didn't exist).
I hope this solves your problem if you haven't solved it by now.
Regards,
Chris

[Q] Make a private Caldav server work

Hi, I recently purchased the ZTE Open C and want to synchronize its calendar with my own Caldav server.
Firefox rejects the connection tough, because the server has an invalid (self signed) certificate.
So i tried adding my certificate to firefox.
I found this guide:
http : // wiki . mozfr . org / Adding_CA_to_FirefoxOS
(Sorry for inserted spaces, won't let me post a link in first post.)
However I fail in the very first steps.
Code:
adb shell ls /data/b2g/mozilla/
Returns: /data/b2g/mozilla/: Permission denied
This means I dont have reading rights in this directory.
How do I get those rights, or alternativeley is there a better way to achieve my Caldav-Server goal?
Mathews123 said:
Hi, I recently purchased the ZTE Open C and want to synchronize its calendar with my own Caldav server.
Firefox rejects the connection tough, because the server has an invalid (self signed) certificate.
So i tried adding my certificate to firefox.
I found this guide:
http : // wiki . mozfr . org / Adding_CA_to_FirefoxOS
(Sorry for inserted spaces, won't let me post a link in first post.)
However I fail in the very first steps.
Code:
adb shell ls /data/b2g/mozilla/
Returns: /data/b2g/mozilla/: Permission denied
This means I dont have reading rights in this directory.
How do I get those rights, or alternativeley is there a better way to achieve my Caldav-Server goal?
Click to expand...
Click to collapse
You cannot use that method unless your phone is rooted, BUT...
I had the same problem and solved it a lot easier. Just launch the browser and input your server's URL. Then you will be warned about the not valid cert, add a permanent exception and that's all, now calendars should sync over HTTPS.
BTW this worked for me until FFOS v1.4. Today I updated to FFOS 2.1 and this trick stopped working, so you have been warned.
Thank you for the suggestion.
I am not running v2.0, so I tried it.
I could add the certificate.
However, when trying to connect, I get:
"Unknown Error. Please try again later."
Any way to figure out what's wrong now?
Seems to be a problem with the server I used. (Baikal)
Using a different one (Owncloud - sadly quite a lot bigger), it works with your tip.
So thanks for the help.
to ged rid of the "unknown error" in Caldav (etc.?)
doragasu said:
I had the same problem and solved it a lot easier. Just launch the browser and input your server's URL. Then you will be warned about the not valid cert, add a permanent exception and that's all, now calendars should sync over HTTPS.
Click to expand...
Click to collapse
thank you so much :victory:

Certificate error when trying to establish email account connection

I am trying to connect an email app (AquaMail) on my phone (Sprint Samsung Note 4, stock rooted, Android OS 5.0.1) to my email server (IMAP) using SSL. When I try this, I get the following error message:
Incoming mail server (IMAP): Invalid security (SSL) certificate. java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
The server to which I am trying to connect is my own VPS. I do have a wild card certificate installed on the site and I believe it is installed properly. I say this because of the report I generated on www.ssllabs.com/ssltest:
Certificate: 100%
Protocol Support: 95%
Key Exchange: 90%
Cipher Strength: 90%
Two certification paths are shown: mail.mydomain.com -> StartCom Class 2 Primary Intermediate Server CA -> StartCom Certification Authority (one path shows this with SHA1withRSA and the other shows SHA256withRSA).
Looking at the Handshake Simulation section, it clearly shows that Android 5.0.0 functions properly, but is also shows that Java 7u25 has a 'protocol or cipher suite mismatch'. This same warning shows up for other, deprecated systems and is probably due to my having turned off older, insecure access protocols.
Can anyone suggest how to get this working properly? Yes, I could work around this by a) allowing all certificate or b) not using secure protocols; but neither of these are solutions.
Thank you for your help!

Categories

Resources