{"id":1513,"date":"2016-08-04T18:10:55","date_gmt":"2016-08-04T16:10:55","guid":{"rendered":"https:\/\/www.boc.de\/watchguard-info-portal\/?p=1513"},"modified":"2016-08-29T17:00:17","modified_gmt":"2016-08-29T15:00:17","slug":"ipsec-vpn-watchguard-android-nativer-client","status":"publish","type":"post","link":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/2016\/08\/ipsec-vpn-watchguard-android-nativer-client\/","title":{"rendered":"IPSec VPN WatchGuard <=> Android (nativer Client)"},"content":{"rendered":"<p>Dieser Artikel beschreibt die Anbindung eines Android 6.0.1\u00a0Marshmallow mit dem Native Client per\u00a0IPSec an eine WatchGuard Firebox\/XTM.<\/p>\n<h4>Nativer Client<\/h4>\n<p>Die in der\u00a0WatchGuard Help (Stand: 04.08.2016) angegebenen Hinweise auf die IPSec Proposals beziehen sich auf Android 4.x. Dort steht &#8220;do not use SHA2 in the Phase 1 and Phase 2 settings. SHA2 is not supported on the VPN clients on Android devices&#8221;. Mittlerweile wird jedoch SHA1 als nicht mehr ausreichend sicher eingestuft und soll eigentlich nicht mehr verwendet werden. SHA2 wird inzwischen von Android in Phase 1 und Phase 2 unterst\u00fctzt. Theoretisch zumindest.<br \/>\nLeider funktioniert\u00a0genau dieses SHA2 in Phase 2\u00a0nicht richtig. Es wird zwar eine Verbindung hergestellt, aber danach kann kein SA ausgehandelt werden, womit\u00a0das Android-Device\u00a0ohne Routing gar nicht mehr kommunizieren kann. Hier folgt eine genauere Betrachtung der Proposals und eine Anleitung mit funktionierenden Parametern.<\/p>\n<p><!--more--><\/p>\n<p>Nach dem <a href=\"https:\/\/www.boc.de\/watchguard-info-portal\/debugging-von-ipsec-verbindungen-debug-log-level\/\">Anschalten der Debug-Logs f\u00fcr IKE auf der WatchGuard<\/a>\u00a0und durch Setzen eines nicht unterst\u00fctzten Phase-2-Proposals auf der WatchGuard (hier: SHA2-AES-512) kann man alle Proposals und die Reihenfolge im Log\u00a0ablesen. Die verwendeten Phase-2-Proposals des Android Clients sind (Cyanogemmod 13, Android 6.0.1, patchlevel 5. August 2016):<\/p>\n<ol>\n<li>ESP-HMAC-SHA2-256<\/li>\n<li>ESP-HMAC SHA1<\/li>\n<li>ESP-HMAC-MD5<\/li>\n<li>AES-128<\/li>\n<li>ESP authentication none<\/li>\n<li>ESP-3DES<\/li>\n<li>ESP-DES<\/li>\n<\/ol>\n<p>Man erkennt, dass inzwischen mit folgenden Default Proposals gearbeitet wird:<\/p>\n<p><strong>Phase 1<\/strong><\/p>\n<ul>\n<li>Authentication: SHA2-256<\/li>\n<li>Encryption: AES-256<\/li>\n<li>Diffie-Hellman Group 2<\/li>\n<\/ul>\n<p><strong>Phase 2<\/strong><\/p>\n<ul>\n<li>ESP<\/li>\n<li>Authentication: SHA2-256<\/li>\n<li>Encryption: AES-256<\/li>\n<li>kein PFS<\/li>\n<\/ul>\n<p>Nach dem Abgleichen der Parameter kommt sofort ein Connect zustande, aber leider kein Datentransfer.\u00a0Internet-Recherche bringt zutage, dass der Android-VPN-Client in Marshmallow 6.0.1 leider eine &#8220;seltsame&#8221; SHA2-Implementierung\u00a0verwendet, und diese auch noch f\u00fcr das Default Proposal eingesetzt wird. (<a href=\"https:\/\/code.google.com\/p\/android\/issues\/detail?id=196939\" target=\"NEU\">https:\/\/code.google.com\/p\/android\/issues\/detail?id=196939<\/a>)<\/p>\n<pre>[...] It seems the version of SHA2-256 that Android 6.x.x is using is an older draft specification and the one implemented in many other IPsec implementations uses the official SHA2-256 implementation with the correct padding and whatever else. [...]\r\n\r\n(04-Jun-2016):\r\nThis issue is fixed internally and fix will be available in future releases.<\/pre>\n<p>Stellt man das Phase 2 Proposal auf SHA1 zur\u00fcck, wird das Default ESP-SHA2-256-AES-256 Proposal des Android-Clients von der WatchGuard verworfen und der Client versucht anschlie\u00dfend, mit dem folgenden Proposal eine Verbindung aufzubauen. Dies klappt dann schlie\u00dflich auch.<\/p>\n<h4>Funktionierende Einstellungen:<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1533 size-full\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-1.png\" alt=\"android-ipsec-1\" width=\"456\" height=\"602\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-1.png 456w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-1-227x300.png 227w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/p>\n<ul>\n<li><strong>Group Name: Android<\/strong> &#8211; wird beim Client nochmal ben\u00f6tigt.<\/li>\n<\/ul>\n<p><strong>Phase 1:<\/strong><\/p>\n<ul>\n<li><strong>Authentication: SHA2-256<\/strong><\/li>\n<li><strong>Encryption: AES-256<\/strong><\/li>\n<li><strong>Diffie-Hellman Group 2 <\/strong>(wird unter Advanced eingestellt):<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1534 size-full\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-2.png\" alt=\"android-ipsec-2\" width=\"414\" height=\"348\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-2.png 414w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-2-300x252.png 300w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1535 size-full alignleft\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-3.png\" alt=\"android-ipsec-3\" width=\"390\" height=\"319\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-3.png 390w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-3-300x245.png 300w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Phase 2 Proposal<\/strong><\/p>\n<ul>\n<li><strong>ESP<\/strong><\/li>\n<li><strong>Authentication: SHA1<\/strong><\/li>\n<li><strong>Encryption: AES-256<\/strong><\/li>\n<li><strong>kein PFS<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1538 size-full\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-4.png\" alt=\"android-ipsec-4\" width=\"458\" height=\"601\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-4.png 458w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-ipsec-4-229x300.png 229w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Der komplette Traffic wird durch den Tunnel geroutet, die Resourcen Any-External und 0.0.0.0\/0 werden dadurch automatisch angelegt.\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>Einstellungen beim Android Client:<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1536 size-full alignnone\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-1.png\" alt=\"android-nativ-ipsec-client-1\" width=\"396\" height=\"700\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-1.png 396w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-1-170x300.png 170w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/>\u00a0 \u00a0 \u00a0<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1537 alignnone\" style=\"font-size: inherit; line-height: 1.6;\" src=\"https:\/\/www.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-2.png\" alt=\"android-nativ-ipsec-client-2\" width=\"400\" height=\"749\" srcset=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-2.png 400w, https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-content\/uploads\/2016\/08\/android-nativ-ipsec-client-2-160x300.png 160w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<ul>\n<li>IPSec-ID ist der oben definierte Group Name (&#8220;Android&#8221;)<\/li>\n<li>Die\u00a0erweiterten Optionen k\u00f6nnen leer bleiben.<\/li>\n<\/ul>\n<h4>Tests<\/h4>\n<p>Nach dem Connect durch den Android Client sollte man \u00fcber z.B. www.wieistmeineip.de testen, ob das Routing durch die Firewall sauber\u00a0funktioniert. Dort sollte dann als Quell-IP die \u00f6ffentliche IP der WatchGuard angezeigt werden, mit der man per VPN verbunden ist.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dieser Artikel beschreibt die Anbindung eines Android 6.0.1\u00a0Marshmallow mit dem Native Client per\u00a0IPSec an eine WatchGuard Firebox\/XTM. Nativer Client Die in der\u00a0WatchGuard Help (Stand: 04.08.2016) angegebenen Hinweise auf die IPSec Proposals beziehen sich auf Android 4.x. Dort steht &#8220;do not use SHA2 in the Phase 1 and Phase 2 settings. SHA2 is not supported on the VPN clients on Android devices&#8221;. Mittlerweile wird jedoch SHA1 &hellip; <a href=\"https:\/\/wordpress.boc.de\/watchguard-info-portal\/2016\/08\/ipsec-vpn-watchguard-android-nativer-client\/\" class=\"more-link\">Weiterlesen <span class=\"screen-reader-text\">IPSec VPN WatchGuard <=> Android (nativer Client)<\/span> <span class=\"meta-nav\">&raquo;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[362,3],"tags":[145,12],"class_list":["post-1513","post","type-post","status-publish","format-standard","hentry","category-howto","category-watchguard-technischer-blog","tag-android","tag-ipsec"],"_links":{"self":[{"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/posts\/1513"}],"collection":[{"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/comments?post=1513"}],"version-history":[{"count":17,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/posts\/1513\/revisions"}],"predecessor-version":[{"id":1550,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/posts\/1513\/revisions\/1550"}],"wp:attachment":[{"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/media?parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/categories?post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.boc.de\/watchguard-info-portal\/wp-json\/wp\/v2\/tags?post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}