L2TP: iOS is using CHAP (or MD5-CHAP) as it's authentication method instead of MS-CHAPv2
I am responsible for integrating iOS VPN L2TP connectivity into our environment.
I refer you to the Enterprise Deployment Guide: http://manuals.info.apple.com/en_US/Enterprise_Deployment_Guide.pdf
On page 10 it is stated "L2TP/IPSec with user authentication by MS-CHAPV2 Password".
However in my testing I have found that the iOS is using CHAP (or MD5-CHAP) as it's authentication method instead of MS-CHAPv2.
Are my findings correct?
Let me provide evidence as to why I have come to this conclusion.
My firwall device is a SonicWALL TZ210.
I have a Windows 2008 R2 server with the Network Policy Server (NPS) role installed and configured. This is my RADIUS server. It is configured to accept the authentication methods MS-CHAP (v1) or MS-CHAP-v2.
The TZ210 uses the NPS RADIUS server to authenticate users connecting a L2TP VPN.
To test that this configuration is working as expected I was able to configure Windows XP with a L2TP VPN connection. Doesn’t require certificates, just requires the shared secret option to be selected + the protocol to be MS-CHAPv2.
With the Windows XP machine I am able to connect using the L2TP VPN.
To confirm the authentication method that is being sent to the TZ210 I type my password incorrectly. Here is the output from the TZ210:
- Info L2TP Server L2TP Server : L2TP Session Established. yyy.yyy.yyy.yyy, 1701 xxx.xxx.xxx.xxx, 1701 LocalSessionID=0xbf67, RemoteSessionId=0x1
- Info PPP PPP: Starting CHAP authentication
- Info Remote Authentication User login denied - RADIUS authentication failure yyy.yyy.yyy.yyy, 0, X1 (testuser) xxx.xxx.xxx.xxx, 0, X1 testuser, TCP Port: 0
- Info PPP PPP: MS-CHAP authentication failed - check username / password
- Info L2TP Server L2TP Server: RADIUS/LDAP reports Authentication Failure yyy.yyy.yyy.yyy, 1701 (testuser) xxx.xxx.xxx.xxx, 1701 Host Name :XPPro, User Name :testuser, Auth Algorithm :MS-CHAP
Specifically I want to highlight on the last line "Auth Algorithm :MS-CHAP".
The NPS RADIUS server shows this as MS-CHAPv2.
Now a test from the iPad trying to establish a L2TP VPN. Here is the output from the TZ210:
- Info L2TP Server L2TP Server : L2TP Session Established. zzz.zzz.zzz.zzz, 50611 xxx.xxx.xxx.xxx, 1701 LocalSessionID=0x9d71, RemoteSessionId=0x19e
- Info PPP PPP: Starting CHAP authentication
- Info Remote Authentication User login denied - RADIUS authentication failure zzz.zzz.zzz.zzz, 0, X1 (testuser) xxx.xxx.xxx.xxx, 0, X1 testuser, TCP Port: 0
- Info PPP PPP: CHAP authentication failed - check username / password
- Info L2TP Server L2TP Server: RADIUS/LDAP reports Authentication Failure zzz.zzz.zzz.zzz, 50611 (testuser) xxx.xxx.xxx.xxx, 1701 Host Name :, User Name :testuser, Auth Algorithm :MD5 CHAP
Specifically I want to highlight on the last line "Auth Algorithm :MD5 CHAP ".
The 2008 NPS server shows this as MD5-CHAP.
I would also like to draw your attention to this link: http://www.fuzeqna.com/sonicwallkb/consumer/kbdetail.asp?kbid=6579
This shows you how to configure the VPN on the iPhone. The last screenshot is taken from the logs on the SonicWALL device. If you squint enough or zoom in the image, you can see in their example that the Auth Algorithm is MD5 CHAP.
I understand that I can modify user account attributes to store the user passwords using reversible encryption in Active Directory as per the following link: http://www.fuzeqna.com/sonicwallkb/consumer/kbdetail.asp?kbid=7170&formaction=fa qalert
Clearly this isn't preffered method.
So to restate my findings:
In my testing I have found that the iOS is using CHAP (or MD5-CHAP) as it's authentication method instead of MS-CHAPv2.
Question 1:
Are my findings correct? Is the Enterprise Deployment Guide incorrect?
Question 2:
How can I make the iOS communicate using MS-CHAPv2?
I have been testing on an iPad 4.3.3.
iPad, iOS 4.3.2