{"id":224,"date":"2015-02-23T12:28:20","date_gmt":"2015-02-23T12:28:20","guid":{"rendered":"http:\/\/iddles.co.uk\/blogs\/?p=224"},"modified":"2015-02-23T12:28:20","modified_gmt":"2015-02-23T12:28:20","slug":"windows-phone-8-1-to-cisco-asa-vpn","status":"publish","type":"post","link":"https:\/\/iddles.co.uk\/index.php\/2015\/02\/23\/windows-phone-8-1-to-cisco-asa-vpn\/","title":{"rendered":"Windows Phone 8.1 to Cisco ASA VPN"},"content":{"rendered":"<p>[There is next to no information availible on this around so this was borne out of experimentation and a lot of packet capture analytics]<br \/>\n<strong>Update:\u00a0 Since testing this I have since found that L2TP\/IPsec does not work if the ASA is behind a NAT device.\u00a0 This is because the WP81 device explicitly will not connect to a NAT-T device.\u00a0 There is a registry key on Windows to enable this, however nothing on WP8.\u00a0\u00a0 <\/strong><br \/>\nWindows Phone 8.1 introduced a Native VPN client to the operating system.\u00a0 It allows L2TP\/IPsec and IPSEC IKEv2 nativly, and various SSL VPN providers via plug ins downloaded from the Windows Store.\u00a0 At the moment Juniper, Checkpoint and F5 have all made clients.\u00a0 Sadly Cisco has not yet, although is due to release one by mid 2015.<br \/>\nThis leaves organisations with a quandry not being able to support Windows Phone.\u00a0\u00a0 This is a shame as the platform appears to try to support strong authentication and encryption schemes where possible.<br \/>\nYou would like to think that Windows Phone supporting IKEv2 and Cisco AnyConnect 3.x\/4.x&#8217;s IPSEC implmentation using only IKEv2 that it would interoperate.\u00a0 <del>Sadly it does not.\u00a0 The ASA &#8211; for some reason &#8211; always believes the Windows Phone to be a L2L (LAN to LAN\/Site to Site) VPN.\u00a0 Repeated attempts could not get this to work.<br \/>\n<\/del>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.<br \/>\nIKEv2 Proposals send from Windows Phone (just for information) are:<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"79\">3DES<\/td>\n<td valign=\"top\" width=\"64\"><\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">128<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">3DES<\/td>\n<td valign=\"top\" width=\"64\"><\/td>\n<td valign=\"top\" width=\"64\">SHA256<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">128<\/td>\n<td valign=\"top\" width=\"64\">SHA256<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">128<\/td>\n<td valign=\"top\" width=\"64\">SHA384<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I&#8217;m still battling the ASA\/WP81 connection using IKEv2 and certificates.\u00a0\u00a0 The configuration appears to be a little problematic and current working solutions rely on the use of EAP for the client authentication.\u00a0\u00a0 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\u00a0 &#8230;.. [currently talking to TAC]<br \/>\nThis only leaves L2TP\/IPsec as an option, which the ASA does support.\u00a0 Effectivly this uses an IKEv1 IPSEC channel to tunnel L2TP over.\u00a0 L2TP is not a very secure protocol but is very good for tunneling, but over IPSEC it should be fine for most environments.\u00a0 As mentioned IKEv1 is used and the following modes are proposed from Windows Phone:<\/p>\n<table style=\"height:50px;\" border=\"1\" width=\"532\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">256<\/td>\n<td valign=\"top\" width=\"71\">28800<\/td>\n<td valign=\"top\" width=\"64\">\u00a0seconds<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 20<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">128<\/td>\n<td valign=\"top\" width=\"71\">28800<\/td>\n<td valign=\"top\" width=\"64\">seconds<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 19<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">AES-CBC<\/td>\n<td valign=\"top\" width=\"64\">256<\/td>\n<td valign=\"top\" width=\"71\">28800<\/td>\n<td valign=\"top\" width=\"64\">seconds<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 14<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">3DES<\/td>\n<td valign=\"top\" width=\"64\"><\/td>\n<td valign=\"top\" width=\"71\">28800<\/td>\n<td valign=\"top\" width=\"64\">seconds<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 14<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"79\">3DES<\/td>\n<td valign=\"top\" width=\"64\"><\/td>\n<td valign=\"top\" width=\"71\">28800<\/td>\n<td valign=\"top\" width=\"64\">seconds<\/td>\n<td valign=\"top\" width=\"64\">SHA1<\/td>\n<td valign=\"top\" width=\"72\">DH Gp 2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>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.\u00a0\u00a0 Not 100% sure of the reason, but I suspect Cisco only support DH Group 20, 19 and 14 when using IKEv2.\u00a0 Thus on ASA side you need to add:<\/p>\n<pre>crypto ikev1 policy 5 (or whatever you have free)\n authentication rsa-sig\n encryption 3des\n hash sha\n group 2\n lifetime 28800<\/pre>\n<p>You then need to look at the IPSEC SA.\u00a0 The &#8216;best&#8217; I found to work was using AES128 with SHA1 hash.\u00a0\u00a0 The Windows client differs to a standard client in that it uses TRANSPORT mode, as apposed to TUNNEL mode.\u00a0 Windows also has some values for SA lifetimes that need to be used.\u00a0 Thus ASA config needs the following:<\/p>\n<pre>! Note:  My ASA external interface is called 'outside', YMMV\ncrypto dynamic-map outside_dyn_map 60000 set ikev1 transform-set ESP-AES-128-SHA-TRANS ESP-3DES-SHA-TRANS\ncrypto dynamic-map outside_dyn_map 60000 set security-association lifeftime seconds 3600\ncrypto dynamic-map outside_dyn_map 60000 set security-association lifeftime kilobytes 250000\n! Note: No PFS is supported\n! Note: NAT-T is enabled by default.<\/pre>\n<p>I could have ammended the standard dynamic crypto map to include these values but decides to keep it seperate.<br \/>\nNext challenge is authentication.\u00a0\u00a0 The ASA supports Certificate based, but Windows Phone only supports Pre Shared Key along with username and password.\u00a0 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.\u00a0\u00a0 Also the L2TP\/IPsec profile does not support the concept of a &#8216;group&#8217; (which can be used to map to an ASA connection profile) thus the <strong>DefaultRAGroup<\/strong> has to be used.\u00a0 Heres hoping haven&#8217;t used this group for any of your client access \ud83d\ude42 \u00a0 If you have then you need to be very careful to break any existing access.<br \/>\nFirst you need to create a new group policy to attatch to the group<\/p>\n<pre>group-policy GP-WinPhone internal\ngroup-policy GP-WinPhone attributes\n wins-server none\n dns-server value 10.x.x.x 192.168.x.x\n vpn-tunnel-protocol l2tp-ipsec\n pfs enable\n default-domain value yourdomain.local<\/pre>\n<p>This sets the protocol, client domain servers and name.\u00a0 Next update the tunnel group<\/p>\n<pre>tunnel-group DefaultRAGroup general-attributes\n address-pool OneOfYourPools\n default-group-policy GP-WinPhone\n authentication-server-group LOCAL\n ! Set a different group here depending on local security policy\ntunnel-group DefaultRAGroup ipsec-attributes\n ikev1 pre-shared-key xxxxxxxxxx\n isakmp keepalive disable\ntunnel-group DefaultRAGroup ppp-attributes\n no authentication ppp\n no auuthentication ms-chap-v1\n authentication ms-chap-v2\n<\/pre>\n<p>This should be enough apart from adding a new local user for authentication.\u00a0 In the above I used the local user database.<\/p>\n<pre>username myWinPhoUser password xxxxxxxxx nt-encrypted\nusername myWinPhoUser attributes\n service-type remote-access<\/pre>\n<p>That should get you a working connection ASA side.<br \/>\nFrom the Windows Phone side configure from Settings &gt; VPN &gt; Add:<br \/>\n<a href=\"http:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0002.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-232\" src=\"http:\/\/iddles.co.uk\/blogs\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0002-180x300.jpg\" alt=\"wp_ss_20150223_0002\" width=\"180\" height=\"300\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0002-180x300.jpg 180w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0002.jpg 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0002-614x1024.jpg 614w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a>\u00a0 <a href=\"http:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0001.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-231\" src=\"http:\/\/iddles.co.uk\/blogs\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0001-180x300.jpg\" alt=\"wp_ss_20150223_0001\" width=\"180\" height=\"300\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0001-180x300.jpg 180w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0001.jpg 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0001-614x1024.jpg 614w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a> <a href=\"http:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0003.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-230\" src=\"http:\/\/iddles.co.uk\/blogs\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0003-180x300.jpg\" alt=\"wp_ss_20150223_0003\" width=\"180\" height=\"300\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0003-180x300.jpg 180w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0003.jpg 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0003-614x1024.jpg 614w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a> <a href=\"http:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0004.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-229\" src=\"http:\/\/iddles.co.uk\/blogs\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0004-180x300.jpg\" alt=\"wp_ss_20150223_0004\" width=\"180\" height=\"300\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0004-180x300.jpg 180w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0004.jpg 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2015\/02\/wp_ss_20150223_0004-614x1024.jpg 614w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/a><br \/>\nYou can decide to set a Proxy as need be.\u00a0 As discussed before, there is no way to use L2TP\/IPsec without a username and password being set.\u00a0 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.<br \/>\nGood luck !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[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:\u00a0 Since testing this I have since found that L2TP\/IPsec does not work if the ASA is behind a NAT device.\u00a0 This is because the WP81 device explicitly will not connect [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[7,11],"tags":[25,63],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-networking","category-security","tag-cisco-asa","tag-windows-phone","post-preview"],"_links":{"self":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":0,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}