eap-mschapv2 and MPPE keys
I am trying to get an ike2 ipsec vpn to work on pfsense 2.3.2 (with strongswan 5.5) doing EAP-RADIUS to a FreeRadius server (2.2.9) that comes with Apple server (OS X 10.11). All of the pieces are connected and communicating properly. The pfsense is sending the eap-mschapv2 requests to freeradius and freeradius is sending back an Access-Accept. However, the IKE_AUTH fails because there is no MSK. Looking at the output of radiusd –X, I see that it is not sending back MS-MPPE-Send-Key/MS-MPPE-Recv-Key, even though use_mppe = yes in the mschap module config. I’ve tried toggling require_encryption as well with no noticeable difference. Does anyone have any ideas on how to get FreeRadius to send back the MPPE keys? We had initially been doing this on an older apple server and I found a reference to a bug in freeradius where rlm_eap_mschap.c was stripping MPPE keys which was fixed in 2010 (#1). As far as I can tell, the version of freeradius included in El Capitan is many versions newer and should already have this fix. I can provide any logs/debug/config that may be needed to diagnose, but don’t want to just spam the list with piles of output that wouldn’t help. ::Adam #1 http://lists.freeradius.org/pipermail/freeradius-users/2010-June/046977.html
On Sep 29, 2016, at 2:09 PM, Adam Schumacher <adam.schumacher@flightaware.com> wrote:
I am trying to get an ike2 ipsec vpn to work on pfsense 2.3.2 (with strongswan 5.5) doing EAP-RADIUS to a FreeRadius server (2.2.9) that comes with Apple server (OS X 10.11). All of the pieces are connected and communicating properly. The pfsense is sending the eap-mschapv2 requests to freeradius and freeradius is sending back an Access-Accept. However, the IKE_AUTH fails because there is no MSK. Looking at the output of radiusd –X, I see that it is not sending back MS-MPPE-Send-Key/MS-MPPE-Recv-Key, even though use_mppe = yes in the mschap module config. I’ve tried toggling require_encryption as well with no noticeable difference. Does anyone have any ideas on how to get FreeRadius to send back the MPPE keys?
Use 3.0.12. We're not going to debug issues in unsupported versions of the server. Alan DeKok.
Hi, El Capitan comes with ancient 2.2.9 version, really? the reason why we ask for the debug output is so that we can help. alan
On 9/29/16, 2:24 PM, "Brian Candler" <b.candler@pobox.com> wrote:
Have you tried "use_tunneled_reply = yes" ?
I don’t think this is relevant in this case as we aren’t tunneling in peap or ttls. It is just straight eap-mschapv2. I did some digging in the freeradius code and I believe I’ve discovered the root cause of my issue. The opendirectory authentication part of the rlm_mschap module returns directly and all the mppe calculations and responses are bypassed. This is the case in 2.2.9, 3.0.12, and still in 4.0.x according to github: https://github.com/FreeRADIUS/freeradius-server/blob/v4.0.x/src/modules/rlm_... Now, while I am okay at reading C code, I’m not sure I’m good enough to write a patch for this. I’m not even sure such a patch is possible given my limited understanding of the existing architecture and the opendirectory auth. My understanding is that opendirectory can be configured to store NTLM hashes of user passwords so *theoretically* it should be possible for od_mschap_auth to calculate nthashhash and provide the resulting mppe keys. ::Adam
On Sep 29, 2016, at 3:51 PM, Adam Schumacher <adam.schumacher@flightaware.com> wrote:
I did some digging in the freeradius code and I believe I’ve discovered the root cause of my issue. The opendirectory authentication part of the rlm_mschap module returns directly and all the mppe calculations and responses are bypassed. This is the case in 2.2.9, 3.0.12, and still in 4.0.x according to github:
https://github.com/FreeRADIUS/freeradius-server/blob/v4.0.x/src/modules/rlm_...
Ah, yes... that magic. :(
Now, while I am okay at reading C code, I’m not sure I’m good enough to write a patch for this. I’m not even sure such a patch is possible given my limited understanding of the existing architecture and the opendirectory auth. My understanding is that opendirectory can be configured to store NTLM hashes of user passwords so *theoretically* it should be possible for od_mschap_auth to calculate nthashhash and provide the resulting mppe keys.
The issue is in getting the NT hashes out of OpenDirectory. It's not overly clear how that happens. I'll see if I can find time to take a look. Alan DeKok.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Adam Schumacher -
Alan DeKok -
Brian Candler