{"id":17964,"date":"2014-08-05T22:08:26","date_gmt":"2014-08-06T02:08:26","guid":{"rendered":"https:\/\/nuxx.net\/blog\/?p=17964"},"modified":"2014-08-12T21:12:55","modified_gmt":"2014-08-13T01:12:55","slug":"breaking-ipv6-on-android-openvpn-via-t-mobile","status":"publish","type":"post","link":"https:\/\/nuxx.net\/blog\/2014\/08\/05\/breaking-ipv6-on-android-openvpn-via-t-mobile\/","title":{"rendered":"Breaking IPv6 on Android OpenVPN via T-Mobile"},"content":{"rendered":"<p><a href=\"https:\/\/nuxx.net\/gallery\/v\/computers\/screenshots\/Screenshot_2014-08-05-21-37-07.png.html?g2_imageViewsIndex=2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Google Nexus 5 w\/ Android 4.4.4 connected via OpenVPN. IPv4 connection goes over the VPN, but IPv6 stays on the mobile network. This also happens with IPsec VPN using the built-in client.\" src=\"https:\/\/nuxx.net\/gallery\/d\/106226-2\/Screenshot_2014-08-05-21-37-07.png\" alt=\"\" width=\"360\" height=\"640\" \/><\/a><\/p>\n<p>While getting ready for a trip to <a href=\"https:\/\/www.defcon.org\/html\/defcon-22\/dc-22-index.html\">DEF CON 22<\/a> I wanted to have a VPN set up from my phone and tablet to connect back home. After a little while I had both <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPsec\">IPsec<\/a> and <a href=\"https:\/\/openvpn.net\/\">OpenVPN<\/a>\u00a0connecting back to <a title=\"PC Engines alix2d13 and Netgate Enclosure\" href=\"https:\/\/nuxx.net\/blog\/2010\/05\/21\/pc-engines-alix2d13-and-netgate-enclosure\/\">the house&#8217;s\u00a0pfSense box<\/a> and passing IPv4 traffic through the tunnel without issue. But, there was a problem when\u00a0connecting over the\u00a0T-Mobile mobile network: the VPN would handle IPv4, but IPv6 was left alone to leak through the carrier.<\/p>\n<p>This can be seen in the screenshot above (<a href=\"https:\/\/nuxx.net\/gallery\/v\/computers\/screenshots\/Screenshot_2014-08-05-21-37-07.png.html\">link<\/a>) where IPv4 is passing through my home&#8217;s Wide Open West connection, but IPv6 goes through T-Mobile. Such leakage has also been written about <a href=\"http:\/\/blog.lxgr.net\/posts\/2013\/03\/06\/vpn-circumvention-ipv6\/\">here by lxgr<\/a>, in much greater detail.<\/p>\n<p>By pushing an IPv6 route to the client from OpenVPN I was able to black hole IPv6 on the client and close this leakage. This is done by adding the following to the\u00a0<em>Advanced configuration<\/em> section of the OpenVPN server config in pfSense:<\/p>\n<pre style=\"padding-left: 30px;\">push \"route-ipv6 ::\/128 ::1\"<\/pre>\n<p>While IPv6 still is configured, all traffic goes to loopback and\u00a0won&#8217;t pass over the mobile network. Connections will then fall back to IPv4, which&#8217;ll go via the VPN.<\/p>\n<p>EDIT: I was also reminded that I can turn off IPv6 in the APN settings. This works, but I really do like keeping this at the provider defaults&#8230; I like having IPv6 when it is available, I just want data\u00a0to go via only the connection I prefer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While getting ready for a trip to DEF CON 22 I wanted to have a VPN set up from my phone and tablet to connect&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/nuxx.net\/blog\/2014\/08\/05\/breaking-ipv6-on-android-openvpn-via-t-mobile\/\">Continue reading<span class=\"screen-reader-text\">Breaking IPv6 on Android OpenVPN via T-Mobile<\/span><\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-17964","post","type-post","status-publish","format-standard","hentry","category-computers","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/17964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/comments?post=17964"}],"version-history":[{"count":5,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/17964\/revisions"}],"predecessor-version":[{"id":17969,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/17964\/revisions\/17969"}],"wp:attachment":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/media?parent=17964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/categories?post=17964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/tags?post=17964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}