[There is next to no information availible on this around so this was borne out of experimentation and a lot of packet capture analytics]
Update: Since testing this I have since found that L2TP/IPsec does not work if the ASA is behind a NAT device. This is because the WP81 device explicitly will not connect to a NAT-T device. There is a registry key on Windows to enable this, however nothing on WP8.
Windows Phone 8.1 introduced a Native VPN client to the operating system. It allows L2TP/IPsec and IPSEC IKEv2 nativly, and various SSL VPN providers via plug ins downloaded from the Windows Store. At the moment Juniper, Checkpoint and F5 have all made clients. Sadly Cisco has not yet, although is due to release one by mid 2015.
This leaves organisations with a quandry not being able to support Windows Phone. This is a shame as the platform appears to try to support strong authentication and encryption schemes where possible.
You would like to think that Windows Phone supporting IKEv2 and Cisco AnyConnect 3.x/4.x’s IPSEC implmentation using only IKEv2 that it would interoperate.
Sadly it does not. The ASA – for some reason – always believes the Windows Phone to be a L2L (LAN to LAN/Site to Site) VPN. Repeated attempts could not get this to work.Since writing the above and reading the Cisco documentation more, you need ASA to be at 9.3(2) or above to support 3rd Party IPSec clients.
IKEv2 Proposals send from Windows Phone (just for information) are:
|3DES||SHA1||DH Gp 2|
|AES-CBC||128||SHA1||DH Gp 2|
|3DES||SHA256||DH Gp 2|
|AES-CBC||128||SHA256||DH Gp 2|
|AES-CBC||128||SHA384||DH Gp 2|
I’m still battling the ASA/WP81 connection using IKEv2 and certificates. The configuration appears to be a little problematic and current working solutions rely on the use of EAP for the client authentication. However, if you want to do plain, boring, RSA certificate authentication at both ends it does not work due to the ASA wanting to use RSA and the WP81 devices trying to ECDHA which the ASA dosent offer ….. [currently talking to TAC]
This only leaves L2TP/IPsec as an option, which the ASA does support. Effectivly this uses an IKEv1 IPSEC channel to tunnel L2TP over. L2TP is not a very secure protocol but is very good for tunneling, but over IPSEC it should be fine for most environments. As mentioned IKEv1 is used and the following modes are proposed from Windows Phone:
|AES-CBC||256||28800||seconds||SHA1||DH Gp 20|
|AES-CBC||128||28800||seconds||SHA1||DH Gp 19|
|AES-CBC||256||28800||seconds||SHA1||DH Gp 14|
|3DES||28800||seconds||SHA1||DH Gp 14|
|3DES||28800||seconds||SHA1||DH Gp 2|
Testing with ASA code 9.2-ish (seems ok on 8.6-ish too), only the last mode (3DES, SHA1, DH Gp2) appears to work. Not 100% sure of the reason, but I suspect Cisco only support DH Group 20, 19 and 14 when using IKEv2. Thus on ASA side you need to add:
crypto ikev1 policy 5 (or whatever you have free) authentication rsa-sig encryption 3des hash sha group 2 lifetime 28800
You then need to look at the IPSEC SA. The ‘best’ I found to work was using AES128 with SHA1 hash. The Windows client differs to a standard client in that it uses TRANSPORT mode, as apposed to TUNNEL mode. Windows also has some values for SA lifetimes that need to be used. Thus ASA config needs the following:
! Note: My ASA external interface is called 'outside', YMMV crypto dynamic-map outside_dyn_map 60000 set ikev1 transform-set ESP-AES-128-SHA-TRANS ESP-3DES-SHA-TRANS crypto dynamic-map outside_dyn_map 60000 set security-association lifeftime seconds 3600 crypto dynamic-map outside_dyn_map 60000 set security-association lifeftime kilobytes 250000 ! Note: No PFS is supported ! Note: NAT-T is enabled by default.
I could have ammended the standard dynamic crypto map to include these values but decides to keep it seperate.
Next challenge is authentication. The ASA supports Certificate based, but Windows Phone only supports Pre Shared Key along with username and password. This can be passed to whatever AAA solution you may have defined within the ASA (such as Active Directory/RADIUS/even SecurID) or could be a local username and password. Also the L2TP/IPsec profile does not support the concept of a ‘group’ (which can be used to map to an ASA connection profile) thus the DefaultRAGroup has to be used. Heres hoping haven’t used this group for any of your client access If you have then you need to be very careful to break any existing access.
First you need to create a new group policy to attatch to the group
group-policy GP-WinPhone internal group-policy GP-WinPhone attributes wins-server none dns-server value 10.x.x.x 192.168.x.x vpn-tunnel-protocol l2tp-ipsec pfs enable default-domain value yourdomain.local
This sets the protocol, client domain servers and name. Next update the tunnel group
tunnel-group DefaultRAGroup general-attributes address-pool OneOfYourPools default-group-policy GP-WinPhone authentication-server-group LOCAL ! Set a different group here depending on local security policy tunnel-group DefaultRAGroup ipsec-attributes ikev1 pre-shared-key xxxxxxxxxx isakmp keepalive disable tunnel-group DefaultRAGroup ppp-attributes no authentication ppp no auuthentication ms-chap-v1 authentication ms-chap-v2
This should be enough apart from adding a new local user for authentication. In the above I used the local user database.
username myWinPhoUser password xxxxxxxxx nt-encrypted username myWinPhoUser attributes service-type remote-access
That should get you a working connection ASA side.
From the Windows Phone side configure from Settings > VPN > Add:
You can decide to set a Proxy as need be. As discussed before, there is no way to use L2TP/IPsec without a username and password being set. So you may as well use them either using a local user as additional Pre Shared Key or Active Directory Username and Password as additional authentication.
Good luck !