freeradius / eap-tls / Android 13
-
@furom It looks like this should contain the interesting error
(4) ERROR: Failed retrieving values required to evaluate condition (4) [expiration] = noop (4) [logintime] = noop (4) pap: WARNING: Auth-Type already set. Not setting to PAP (4) [pap] = noop (4) } # authorize = updated (4) Found Auth-Type = eap (4) # Executing group from file /usr/local/etc/raddb/sites-enabled/default (4) authenticate { (4) eap: Expiring EAP session with state 0x4c94f6214f91fbc3 (4) eap: Finished EAP session with state 0x4c94f6214f91fbc3 (4) eap: Previous EAP request found for state 0x4c94f6214f91fbc3, released from the list (4) eap: Peer sent packet with method EAP TLS (13) (4) eap: Calling submodule eap_tls to process data (4) eap_tls: (TLS) EAP Done initial handshake (4) eap_tls: (TLS) recv TLS 1.2 Alert, fatal internal_error (4) eap_tls: ERROR: (TLS) Alert read:fatal:internal error (4) eap_tls: (TLS) Server : Need to read more data: error (4) eap_tls: ERROR: (TLS) Failed reading from OpenSSL: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error (4) eap_tls: (TLS) In Handshake Phase (4) eap_tls: (TLS) Application data. (4) eap_tls: ERROR: (TLS) Cannot continue, as the peer is misbehaving. (4) eap_tls: ERROR: [eaptls process] = fail (4) eap: ERROR: Failed continuing EAP TLS (13) session. EAP sub-module failed (4) eap: Sending EAP Failure (code 4) ID 5 length 4 (4) eap: Failed in EAP select (4) [eap] = invalid (4) } # authenticate = invalid (4) Failed to authenticate the user (4) Using Post-Auth-Type Reject (4) # Executing group from file /usr/local/etc/raddb/sites-enabled/default (4) Post-Auth-Type REJECT { (4) attr_filter.access_reject: EXPAND %{User-Name}
The top 4 rows repeat a few times without the other errors. Interestingly, it says that it needs to 'read more data', and the first error reads like this
(1) ERROR: Failed retrieving values required to evaluate condition (1) [expiration] = noop (1) [logintime] = noop (1) pap: WARNING: Auth-Type already set. Not setting to PAP (1) [pap] = noop (1) } # authorize = updated (1) Found Auth-Type = eap (1) # Executing group from file /usr/local/etc/raddb/sites-enabled/default (1) authenticate { (1) eap: Expiring EAP session with state 0x4c94f6214c96fbc3 (1) eap: Finished EAP session with state 0x4c94f6214c96fbc3 (1) eap: Previous EAP request found for state 0x4c94f6214c96fbc3, released from the list (1) eap: Peer sent packet with method EAP TLS (13) (1) eap: Calling submodule eap_tls to process data (1) eap_tls: (TLS) EAP Got final fragment (131 bytes) (1) eap_tls: WARNING: (TLS) EAP Total received record fragments (131 bytes), does not equal expected expected data length (0 bytes)
So something is going on here...
-
@furom said in freeradius / eap-tls / Android 13:
(4) eap_tls: (TLS) EAP Done initial handshake
(4) eap_tls: (TLS) recv TLS 1.2 Alert, fatal internal_error
(4) eap_tls: ERROR: (TLS) Alert read:fatal:internal error
(4) eap_tls: (TLS) Server : Need to read more data: error
(4) eap_tls: ERROR: (TLS) Failed reading from OpenSSL: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
(4) eap_tls: (TLS) In Handshake Phase
(4) eap_tls: (TLS) Application data.
(4) eap_tls: ERROR: (TLS) Cannot continue, as the peer is misbehaving.Well that for sure would explain why your eap-tls is not working... But your saying you got your old tablet working.. Are you not using the same certs that you used for server and same CA?
So something wrong with the client cert, or how the client is sending it? Or just how the client does the handshake?
edit: My son has a android phone - not sure when he will be over next... We might be doing some sort of bbq on monday, so if so I will try to get his phone connected, not sure what its running.. But I do know it is an android device.
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom said in freeradius / eap-tls / Android 13:
(4) eap_tls: (TLS) EAP Done initial handshake
(4) eap_tls: (TLS) recv TLS 1.2 Alert, fatal internal_error
(4) eap_tls: ERROR: (TLS) Alert read:fatal:internal error
(4) eap_tls: (TLS) Server : Need to read more data: error
(4) eap_tls: ERROR: (TLS) Failed reading from OpenSSL: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
(4) eap_tls: (TLS) In Handshake Phase
(4) eap_tls: (TLS) Application data.
(4) eap_tls: ERROR: (TLS) Cannot continue, as the peer is misbehaving.Well that for sure would explain why your eap-tls is not working... But your saying you got your old tablet working.. Are you not using the same certs that you used for server and same CA?
So something wrong with the client cert, or how the client is sending it?
Glad to hear it makes some sense at least. Not looking great, so much I do understand... :)
No, I created a second cert for the new tablet as I may want them both still...
I now copied the cert I used on the old tablet (working with WPA2-Enterprise/eap-tls/Android 7) to the new one, and errors are identical
-
@furom Perhaps a fragmentation problem ?
Try to edit eap.conf and set fragment_size = 1344A nanoHD and a unifi6-lite only worked with wpa2-enterprise after doing this change.
-
@furom I looked up if they plan on updating my P11 plus to 13, and doesn't look like it - they list 12 as last, and actually eol security updates 11/23, so that not good.. But the little * says
Lenovo tablets get updates for security issues documented in Android Security bulletin.
Its only my train tablet so not too worried about it, but would be nice if could update to 13 and test..
So this tablet doesn't even work with wpa2 enterprise? I would prob just go with wpa3 personal and call it a day then.. wpa3 personal brings "Simultaneous Authentication of Equals (SAE)." so that is good for any sort of offline attack on the password.
-
@mcury said in freeradius / eap-tls / Android 13:
eap.conf and set fragment_size = 1344
Mine is set to
fragment_size = 1024
Not having any issues.. I do not have a U6-lite, and furom has a uap-ac-lite, which I also have.. I am not seeing any issues with connecting on any of my ap, the lite, the pro or the lr - all just uap-ac, no U6...
I do have a flex HD I could test with, but its currently inactive..
-
@johnpoz said in freeradius / eap-tls / Android 13:
Not having any issues.. I do not have a U6-lite, and furom has a uap-ac-lite, which I also have.. I am not seeing any issues with connecting on any of my ap, the lite, the pro or the lr - all just uap-ac, no U6...
I do have a flex HD I could test with, but its currently inactive..I did have issues with the default values..
At that time, I decided to perform a packet capture and noticed a lot of EAP packets, when it shouldn't have that amount.
After some research, found that changing that value to 1344 fixed all the issues.
https://lists.freeradius.org/pipermail/freeradius-users/2012-January/058297.html
-
@mcury said in freeradius / eap-tls / Android 13:
@furom Perhaps a fragmentation problem ?
Try to edit eap.conf and set fragment_size = 1344A nanoHD and a unifi6-lite only worked with wpa2-enterprise after doing this change.
It would be interesting to test... Where do I find "eap" in freeRadius on pfSense?
-
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom the eap file would be here
/usr/local/etc/raddb/mods-enabled
@mcury the way I read what you linked seems too says to lower it ;) hehe
"The simplest thing to try is to see eap.conf, and change fragment_size
to something smaller."Well, I set it through the gui and restarted in debug mode. Now verified the value in the file file indeed reads "1344", but same error unfortunately.
It was a good try, thanks for that
-
@johnpoz said in freeradius / eap-tls / Android 13:
@mcury the way I read what you linked seems too says to lower it ;) hehe
"The simplest thing to try is to see eap.conf, and change fragment_size
to something smaller.Indeed, but that pointed me to the right direction, from there I decided to perform a packet capture.
Once I set it to 1344, it worked, no more fragmentation.I suppose it was here that I got the suggestion for this value from:
https://community.ui.com/questions/Issue-with-WPA2-Enterprise-Across-sites/7070e262-c2c6-403b-a61d-a98ad3b3db53 -
@mcury that seems to be talking about
"Framed-MTU and set it to 1344 and issue was resolved."
That is different than the fragment size.. Pretty sure that framed -mtu is calculated, I see different values when in debug mode
(3) Framed-MTU = 1400
Different one
(5) User-Name = "tablet.home.arpa"
(5) Framed-MTU += 994Could you post your full output when you run in debug mode @furom attach as a .txt file.
-
Could this be of relevance?
No EAP Start, assuming it's an on-going EAP conversation
Just prior to that it tries to match an email (containing a "@") and fails. So perhaps a username must be an email? Worth a try I suppose
-
@furom said in freeradius / eap-tls / Android 13:
So perhaps a username must be an email? Worth a try I suppose
I see the same notices.. And not having any issue..
(4) # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default (4) authorize { (4) [preprocess] = ok (4) [chap] = noop (4) [mschap] = noop (4) [digest] = noop (4) suffix: Checking for suffix after "@" (4) suffix: No '@' in User-Name = "tablet.home.arpa", skipping NULL due to config. (4) [suffix] = noop (4) ntdomain: Checking for prefix before "\" (4) ntdomain: No '\' in User-Name = "tablet.home.arpa", skipping NULL due to config. (4) [ntdomain] = noop (4) eap: Peer sent EAP Response (code 2) ID 192 length 82 (4) eap: No EAP Start, assuming it's an on-going EAP conversation (4) [eap] = updated (4) files: users: Matched entry tablet.home.arpa at line 17 (4) [files] = ok
-
@johnpoz said in freeradius / eap-tls / Android 13:
(3) Framed-MTU = 1400
This value is set in eap.conf, inside: tls-config tls-common {
# fragment_size = 1024
fragment_size = 1344 -
@mcury Your 2nd link talked about editing the framed-mtu, not the fragment size.. But I believe the framed mtu is normally calculated I thought, I sure don't have a framed-mtu in my eap file, and its seems to be calculating the different framed mtu size based on what size its seeing.
I don't really think its related to that - but something with his android version, seems their are a lot of discussion about android 11 or above and wpa enterprise.. What I have seen seems to be should have a problem in 12 as well. But I think some of these things are handled by the maker changes to their release for their devices.
I am using a lenovo with 12, and @furom is using a samsung with 13.. etc..
What versions of android are you using @mcury and your using eap-tls?
-
@johnpoz said in freeradius / eap-tls / Android 13:
Could you post your full output when you run in debug mode @furom attach as a .txt file.
Sure, just trying to figure what to mask...
Edit:
This is the output from the run; out.txt -
@johnpoz said in freeradius / eap-tls / Android 13:
What versions of android are you using @mcury and your using eap-tls?
Tested with Android 11, 12, Macbook air M1, Iphone 11 pro (I'm almost sure it is an iphone 11) and Windows 10 and 11 22H1.
Yes, using EAP-TLS (lets encrypt certificate), I just renew it within a 90 day period and upload it to freeradius server.
Let me enable the server here in my lab so I can post the debug for you.
-
@mcury Yeah not having any issues with iphone (13), ipad (air 5th gen) both running ios 16.5, windows 10 pro 22H2, acer chromebook running whatever latest os is as of day or two ago, and android lenovo p11+ tablet running 12.
Not sure what the issue is with his.. He got his android 7 working with wpa2 enterprise..
@furom did you get your windows test box working? Did you say you found an issue on your switch? So I assume you got your linux and windows and old tablet all working with wpa2-ent
I don't use amce for my certs for eap-tls, all certs via cert manger in pfsense (23.01) using ECDSA with prime256v1 for both the CA and the server and client certs.
Running unifi controller 7.4.156 and uap-ac-pro, lite and lr AP all on 6.5.54 firmware.
edit: here is output of rad -X and my tablet connecting.
Looks like this time it authed connecting to my LR - so have seen valid connections on all 3 of my different APs.
-
@johnpoz said in freeradius / eap-tls / Android 13:
@mcury Yeah not having any issues with iphone (13), ipad (air 5th gen) both running ios 16.5, windows 10 pro 22H2, acer chromebook running whatever latest os is, and android lenovo p11+ tablet running 12.
Not sure what the issue is with his.. He got his android 7 working with wpa2 enterprise..
@furom did you get your windows test box working? Did you say you found an issue on your switch? So I assume you got your linux and windows and old tablet all working with wpa2-ent
I gave up on the windows client. Issue I had with the Netgate switch was not assigning the correct lan, so when corrected old tablet started working (issue then was it did not get an IP), which is the only client so far
-
@furom well maybe you want to try the amce certs, there shouldn't be anyway the tablet doesn't trust those.. Not exactly sure how you get a client cert, would assume just need to be able to validate your fqdn via dns would get you the client cert, just like your server cert, etc.
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom well maybe you want to try the amce certs, there shouldn't be anyway the tablet doesn't trust those.. Not exactly sure how you get a client cert, would assume just need to be able to validate your fqdn via dns would get you the client cert, just like your server cert, etc.
I have though of it before, but that would require a domain and public DNS, which I don't have.
I really do appreciate you guys trying to find some sense in this. There is a beta of Android 14, not sure if I could load that on my tablet, but could be something. Hopefully this would be fixed in 14, but will hold my breath just a little while longer... :)But as said earlier, 13 is a lot pickier with trusting the CA's. So I would not be surprised if 'let's encrypt' would work right away, as it is trusted by browsers by default
-
I took so long due because this VM wasn't powered on in six months..
My administrator account password expired, users account passwords expired, certificates expired...
More than 160 packages to update in Ubuntu..
Then I got my user stuck in SQL database since simultaneous use is set to one.
What a mess to get this lab working again..With EAP details, ldap and SQL working.. (Android 12 Galaxy S10 connecting to a nandoHD).
full_test.txt -
So found some info last night that said the only way to make Android >11/12 accept a self-signed CA is now to use an MDM (Mobile Device Manager) or a secure app such as Knox to handle the certs.
Edit: Well... put it this way... It was yet another rabbit-hole... A pure nightmare for an average person like myself. Why would I want a full scale mobile deployment environment just to use decent security using certificates - for ONE lousy tablet?? :(
I even tried to get a secure folder working, it would possibly make it work too, but that is not available any longer... bummer...
-
@furom but isn't this line a bit interersting...
Sat May 27 09:36:29 2023 : ERROR: (4) eap_tls: (TLS) Failed reading from OpenSSL: /var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/sources/FreeBSD-src-plus-RELENG_23_01/crypto/openssl/ssl/record/rec_layer_s3.c[1621]:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
It is clearly a path from building pfSense 23.01, or looks that way at least... Perhaps if I try using same certs but with a separate radius server... after all this it could not cause more grief (hopefully)
-
@furom said in freeradius / eap-tls / Android 13:
Perhaps if I try using same certs but with a separate radius server.
Why would that work? Its the client that has to trust the CA.
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom said in freeradius / eap-tls / Android 13:
Perhaps if I try using same certs but with a separate radius server.
Why would that work? Its the client that has to trust the CA.
I know that. :) But thus far a lot less errors at least. :)
-
@furom what about this
https://aboutssl.org/how-to-create-and-import-self-signed-certificate-to-android-device/
Doesn't say what version of android, but it has it adding an option to the CA via openssl
openssl x509 -req -days 3650 -in CA.pem -signkey priv_and_pub.key -extfile ./android_options.txt -out CA.crt
Or I would assume the acme way would work - this isn't a self signed CA, etc. So for like the 10 you could get a domain you could use.. Or you can always get cheap domain like .xyz for like the first year for like 99 cents ;)
edit: guess I am lucky my tablet is only running 12, which accepts my CA.
edit2: also came across this
Android will not allow a Certificate Authority to be installed from certain locations. The SSL cert must be stored in local storage, but not in the "Downloads" folder and not in Google Drive. Even though this is permitted for user certificates, CA certificates won't work unless moved to a local folder that is not the downloads folder.
Where exactly are you putting the CA cert when you try to install it?
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom what about this
https://aboutssl.org/how-to-create-and-import-self-signed-certificate-to-android-device/
Doesn't say what version of android, but it has it adding an option to the CA via openssl
openssl x509 -req -days 3650 -in CA.pem -signkey priv_and_pub.key -extfile ./android_options.txt -out CA.crt
Or I would assume the acme way would work - this isn't a self signed CA, etc. So for like the 10 you could get a domain you could use.. Or you can always get cheap domain like .xyz for like the first year for like 99 cents ;)
edit: guess I am lucky my tablet is only running 12, which accepts my CA.
edit2: also came across this
Android will not allow a Certificate Authority to be installed from certain locations. The SSL cert must be stored in local storage, but not in the "Downloads" folder and not in Google Drive. Even though this is permitted for user certificates, CA certificates won't work unless moved to a local folder that is not the downloads folder.
Where exactly are you putting the CA cert when you try to install it?
In the Downloads folder... Was too lazy to create another one. I figured when installed it gets copied anyways, but is perhaps just linked... worth a try! :)
-
@furom This is where I'm at now;
(3) eap_tls: (TLS) EAP Done initial handshake (3) eap_tls: (TLS) recv TLS 1.2 Alert, fatal unsupported_certificate (3) eap_tls: (TLS) The client is informing us that it does not understand the certificate presented by the server. (3) eap_tls: ERROR: (TLS) Alert read:fatal:unsupported certificate (3) eap_tls: (TLS) Server : Need to read more data: error (3) eap_tls: ERROR: (TLS) Failed reading from OpenSSL: error:0A000413:SSL routines::sslv3 alert unsupported certificate (3) eap_tls: (TLS) In Handshake Phase (3) eap_tls: (TLS) Application data. (3) eap_tls: ERROR: (TLS) Cannot continue, as the peer is misbehaving. (3) eap_tls: ERROR: [eaptls process] = fail (3) eap: ERROR: Failed continuing EAP TLS (13) session. EAP sub-module failed (3) eap: Sending EAP Failure (code 4) ID 25 length 4
I tried with a .crt cert when it needs .pem, so will convert and try again
-
@furom a .crt file is a pem.. That error could mean it its not trusting the cert, because the CA that signed it isn't trusted.
When you look in the crt does its show in the first line when open with text editor?
-----BEGIN CERTIFICATE-----
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom a .crt file is a pem.. That error could mean it its not trusting the cert, because the CA that signed it isn't trusted.
When you look in the crt does its show in the first line when open with text editor?
-----BEGIN CERTIFICATE-----
It does. Both CA & cert
also, just tried moving the certs on the tablet out of Downloads and reinstalled them, then trying against freeRad/pfSense same issue as before...
(4) eap_tls: (TLS) EAP Done initial handshake (4) eap_tls: (TLS) recv TLS 1.2 Alert, fatal internal_error (4) eap_tls: ERROR: (TLS) Alert read:fatal:internal error (4) eap_tls: (TLS) Server : Need to read more data: error (4) eap_tls: ERROR: (TLS) Failed reading from OpenSSL: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error (4) eap_tls: (TLS) In Handshake Phase (4) eap_tls: (TLS) Application data. (4) eap_tls: ERROR: (TLS) Cannot continue, as the peer is misbehaving. (4) eap_tls: ERROR: [eaptls process] = fail (4) eap: ERROR: Failed continuing EAP TLS (13) session. EAP sub-module failed
-
@furom you should see your CA as trusted in your user section..
Did you try it with the link I provided that has adding some sort of option to the CA cert.
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom you should see your CA as trusted in your user section..
Well, it does not show up there... :( Under 'User certificates' both show though, but not whats matter here...
Did you try it with the link I provided that has adding some sort of option to the CA cert.
Not yet. much going on now, but will attend that now :)
-
@furom on my tablet I don't have to do anything special with the cert, I mean a CA created in pfsense would already have the basic constraint of CA already set
I am able to install just from the download folder - I emailed myself the CA.crt - then just installed it, and there it is listed.
edit: you can then see the tablet trusts this certs signed by this CA
-
@johnpoz Well then, if basic constrains is already included... :/
-
@furom but possible android 13 is looking for it elsewhere? Not really an android guy, but you should be able to check on your tablet if it trusts this CA, you should see it in your user section of trusted CAs - like the 2 I have installed.
I have a few different CAs, one for home that I create certs for stuff like my nas, my printer, my pfsense gui, my switches gui's etc..
I also have another one for openvpn, and then the one I created for freerad use.
If you don't see it there - then yeah its highly unlikely that it would trust the cert your freerad server presents, etc.
But its possible wifi stuff using its own settings? Like said not an android guy, notice it doesn't show my homeca as possible ca for my wireless?
So for wireless you might have to install the CA under the wireless settings, but I would think if you have it installed and shown under your user for the system that using the use system certs should work.
I tried using "system" in wifi and didn't work - I have to select the CA I installed using wifi
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom but possible android 13 is looking for it elsewhere? Not really an android guy, but you should be able to check on your tablet if it trusts this CA, you should see it in your user section of trusted CAs - like the 2 I have installed.
I have a few different CAs, one for home that I create certs for stuff like my nas, my printer, my pfsense gui, my switches gui's etc..
I also have another one for openvpn, and then the one I created for freerad use.
It is possible of course. It has never been this troublesome ever before, that is for sure...
I will try the separate radserver once more. I just realized I did not install its server cert etc as also is needed...
I'd rather not go the acme way, I don't want nor need the domain... Sad it must be a requirement, it is so close (and will probably just work) but still so far away... :)
-
@furom said in freeradius / eap-tls / Android 13:
I will try the separate radserver once more
This has nothing to do with it.. Your device needs to trust the CA that you sign the freerad server cert you are using in the freerad setup.
And the freerad server needs to trust the client cert the client presents.. Be that freerad running on pfsense or not would have have nothing to do with your client trusting the CA, or presenting the correct cert that the freerad server will accept.
If you can not get the CA installed on your tablet, or be able to set not to validate it - its not going to work. I believe later versions of android removed that option, which people are complaining about since they are having a hard time getting the CA actually installed as well..
I am not having this issue, as you can see I can install CAs under the wifi setting.. But if you miss a step your going to have a bad day.. Your freerad server should have the same CA, and a server cert you created. Your client needs to trust the CA and present a cert also signed by the CA.
Make sure you have fqdn set for the CN..
-
@johnpoz said in freeradius / eap-tls / Android 13:
@furom said in freeradius / eap-tls / Android 13:
I will try the separate radserver once more
This has nothing to do with it.. Your device needs to trust the CA that you sign the freerad server cert you are using in the freerad setup.
And the freerad server needs to trust the client cert the client presents.. Be that freerad running on pfsense or not would have have nothing to do with your client trusting the CA, or presenting the correct cert that the freerad server will accept.
If you can not get the CA installed on your tablet, or be able to set not to validate it - its not going to work. I believe later versions of android removed that option, which people are complaining about since they are having a hard time getting the CA actually installed as well..
You are right of course... I'm just sad I can't get this to work... And by the looks of it, by design, so not likely to suddenly start working in a later version... :(