Skip to contentSkip to conversation

OpenVPN Connect App on IOS // Support for IPv6-only networks with DNS64/NAT64

Openvpn-devel Kristian McColm 4 participants 8 messages Jul 7, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello List,

As you may be aware, the Internet is running/has run out of IPv4 address space. To that end, I am a part of a team at a national mobile network operator who are working on deploying IPv6-only mode to our Android and iPhone handsets, and deprecating the use of IPv4 on our netowrk. Since we have begun migrations to IPv6-only mode, we have received a few complaints from users of the OpenVPN Connect app on IOS stating that their VPN tunnels are establishing but they are unable to pass and data inside the tunnel.

We have been able to reproduce the issue using an OpenVPN server 2.4.6 on Fedora Linux 26 and an iPhone running IOS 11.3.1 and version 1.2.0 build 0 (iOS 64-bit). The VPN server is IPv4 only and using UDP transport. The IOS device is on an IPv6-only network that provides DNS64/NAT64 for 6to4 translation. The Android device is running Android 6.0.1 and OpenVPN Connect version 3.0.5 (1816). Using the same client profile (.ovpn file) on both the Android and and IOS clients, and the same cell network settings and VPN server, we observe that the VPN tunnel is established OK on both devices, but only the Android is able to pass data traffic inside the VPN tunnel.

Is anyone aware of whether the developers of this application have any experience testing the IOS version of the app on IOS devices on IPv6-only networks, and moreover are the developers aware of and ensuring the app is compliant with Apple standards for IPv6-only networks as documented here: https://developer.apple.com/support/ipv6?

As per our understanding, Apple are actively pursuing apps which are not compliant with these standards, since IOS does not provide 464XLAT at the current time and compliance with Apple's standard is the only way to ensure compatibility with IPv6-only networks such as ours.

If anyone who has any feedback or would like me to test anything or provide any further assistance I would be glad to assist.

Regards
KM

#1 lore raw

Hello,

Quoted 4 lines · Kristian McColm

Hello List,

As you may be aware, the Internet is running/has run out of IPv4 address space. To that end, I am a part of a team at a national mobile network operator who are working on deploying IPv6-only mode to our Android and iPhone handsets, and deprecating the use of IPv4 on our netowrk. Since we have begun migrations to IPv6-only mode, we have received a few complaints from users of the OpenVPN Connect app on IOS stating that their VPN tunnels are establishing but they are unable to pass and data inside the tunnel.

Quoted 8 lines

We have been able to reproduce the issue using an OpenVPN server 2.4.6 on Fedora Linux 26 and an iPhone running IOS 11.3.1 and version 1.2.0 build 0 (iOS 64-bit). The VPN server is IPv4 only and using UDP transport. The IOS device is on an IPv6-only network that provides DNS64/NAT64 for 6to4 translation. The Android device is running Android 6.0.1 and OpenVPN Connect version 3.0.5 (1816). Using the same client profile (.ovpn file) on both the Android and and IOS clients, and the same cell network settings and VPN server, we observe that the VPN tunnel is established OK on both devices, but only the Android is able to pass data traffic inside the VPN tunnel.

Is anyone aware of whether the developers of this application have any experience testing the IOS version of the app on IOS devices on IPv6-only networks, and moreover are the developers aware of and ensuring the app is compliant with Apple standards for IPv6-only networks as documented here: https://developer.apple.com/support/ipv6?

As per our understanding, Apple are actively pursuing apps which are not compliant with these standards, since IOS does not provide 464XLAT at the current time and compliance with Apple's standard is the only way to ensure compatibility with IPv6-only networks such as ours.

If anyone who has any feedback or would like me to test anything or provide any further assistance I would be glad to assist.

I work for OpenVPN, Inc. and I have been responsible for pushing "OpenVPN Connect for iOS" forward from 1.1.1 to 1.2.9.

First of all, thanks a lot for your feedback - we really appreciate when people try to improve software used by the community.

I think I can safely say that until now the development and testing was not focused on IPv6 only networks. Therefore it is very possible that some cases do not work as expected.

However, IPv6-only setups (both inside and outside the tunnel) are on our roadmap and we have already started working on it for what concerns OpenVPN2.

OpenVPN3-core (the library at the core of OpenVPN Connect) should happily support IPv6-only transport networks, therefore I don't have an immediate answer to why this is not working for you.

Would you mind opening a ticket on https://community.openvpn.net (you need to create an account) so that we can better track this issue and ask you to provide more details?

Thanks!

Regards,

Signature · 1 line
Antonio Quartulli
#2 lore raw
In reply to Kristian McColm

Hi,

Quoted 5 lines · Kristian McColm

Is anyone aware of whether the developers of this application have any experience testing the IOS version of the app on IOS devices on IPv6-only networks, and moreover are the developers aware of and ensuring the app is compliant with Apple standards for IPv6-only networks as documented here: https://developer.apple.com/support/ipv6?

Part of OpenVPN's test cycle has been ("for ages") to connect over IPv6- transport, and then put IPv4+IPv6 into the tunnel.

#3 lore raw
In reply to Kristian McColm

Am 07.07.18 um 03:27 schrieb Kristian McColm:

Quoted 11 lines

Hello List,

As you may be aware, the Internet is running/has run out of IPv4 address space. To that end, I am a part of a team at a national mobile network operator who are working on deploying IPv6-only mode to our Android and iPhone handsets, and deprecating the use of IPv4 on our netowrk. Since we have begun migrations to IPv6-only mode, we have received a few complaints from users of the OpenVPN Connect app on IOS stating that their VPN tunnels are establishing but they are unable to pass and data inside the tunnel.

We have been able to reproduce the issue using an OpenVPN server 2.4.6 on Fedora Linux 26 and an iPhone running IOS 11.3.1 and version 1.2.0 build 0 (iOS 64-bit). The VPN server is IPv4 only and using UDP transport. The IOS device is on an IPv6-only network that provides DNS64/NAT64 for 6to4 translation. The Android device is running Android 6.0.1 and OpenVPN Connect version 3.0.5 (1816). Using the same client profile (.ovpn file) on both the Android and and IOS clients, and the same cell network settings and VPN server, we observe that the VPN tunnel is established OK on both devices, but only the Android is able to pass data traffic inside the VPN tunnel.

Is anyone aware of whether the developers of this application have any experience testing the IOS version of the app on IOS devices on IPv6-only networks, and moreover are the developers aware of and ensuring the app is compliant with Apple standards for IPv6-only networks as documented here: https://developer.apple.com/support/ipv6?

As per our understanding, Apple are actively pursuing apps which are not compliant with these standards, since IOS does not provide 464XLAT at the current time and compliance with Apple's standard is the only way to ensure compatibility with IPv6-only networks such as ours.

If anyone who has any feedback or would like me to test anything or provide any further assistance I would be glad to assist.

From my experience with Android and NAT64:

- T-mobile US had (or still has?) an issue with MTU on UDP connections on NAT64. Behaviour looks similar to what you are experiencing. Try if using TCP or UDP makes a difference.

- Too often profiles have literal IPv4 addresses in them instead of IPv6. Google patched its XLAT464 to even allow VPN tunnel to work over XLAT464 (urgh)

- For split tunnel configuration, setting a IPv4 DNS that is unreachable might also cause troubles.

- Reconecting involving NAT64/DNS64 networks often breaks because the whole "what DNS does the VPN app use" is a total mess and often end up with the wrong address (unmapped, still mapped when switching to WiFi).

Arne

#4 lore raw
Quoted 56 lines

-----Original Message-----
From: Arne Schwabe <[email protected]...>
Sent: July 7, 2018 09:34
To: Kristian McColm <[email protected]...>; openvpn- [email protected]
Subject: Re: [Openvpn-devel] OpenVPN Connect App on IOS // Support for IPv6-only networks with DNS64/NAT64

Am 07.07.18 um 03:27 schrieb Kristian McColm:

Quoted 3 lines

Hello List,

As you may be aware, the Internet is running/has run out of IPv4 address

space. To that end, I am a part of a team at a national mobile network operator who are working on deploying IPv6-only mode to our Android and iPhone handsets, and deprecating the use of IPv4 on our netowrk. Since we have begun migrations to IPv6-only mode, we have received a few complaints from users of the OpenVPN Connect app on IOS stating that their VPN tunnels are establishing but they are unable to pass and data inside the tunnel.

Quoted 2 lines

We have been able to reproduce the issue using an OpenVPN server 2.4.6

on Fedora Linux 26 and an iPhone running IOS 11.3.1 and version 1.2.0 build 0 (iOS 64-bit). The VPN server is IPv4 only and using UDP transport. The IOS device is on an IPv6-only network that provides DNS64/NAT64 for 6to4 translation. The Android device is running Android 6.0.1 and OpenVPN Connect version 3.0.5 (1816). Using the same client profile (.ovpn file) on both the Android and and IOS clients, and the same cell network settings and VPN server, we observe that the VPN tunnel is established OK on both devices, but only the Android is able to pass data traffic inside the VPN tunnel.

Quoted 2 lines

Is anyone aware of whether the developers of this application have any

experience testing the IOS version of the app on IOS devices on IPv6-only networks, and moreover are the developers aware of and ensuring the app is compliant with Apple standards for IPv6-only networks as documented
here: https://developer.apple.com/support/ipv6?

Quoted 2 lines

As per our understanding, Apple are actively pursuing apps which are not

compliant with these standards, since IOS does not provide 464XLAT at the current time and compliance with Apple's standard is the only way to ensure compatibility with IPv6-only networks such as ours.

Quoted 2 lines

If anyone who has any feedback or would like me to test anything or

provide any further assistance I would be glad to assist.

From my experience with Android and NAT64:

- T-mobile US had (or still has?) an issue with MTU on UDP connections on NAT64. Behaviour looks similar to what you are experiencing. Try if using TCP or UDP makes a difference.

- Too often profiles have literal IPv4 addresses in them instead of IPv6. Google patched its XLAT464 to even allow VPN tunnel to work over XLAT464 (urgh)

Quoted 8 lines

- For split tunnel configuration, setting a IPv4 DNS that is unreachable might also cause troubles.

- Reconecting involving NAT64/DNS64 networks often breaks because the whole "what DNS does the VPN app use" is a total mess and often end up with the wrong address (unmapped, still mapped when switching to WiFi).

Arne

My profile is using FQDN for the remote VPN host, but the issue comes when apps on the IOS device try to communicate with a server on the other side of the tunnel using IPv4 literals. The IOS device is still synthesizing the IPv4 literal with a NAT64 prefix and this is not routable via the VPN so it fails to work. I was able to resolve this by setting an IPv4 default route using the push command in the server profile. It seems that IOS will continue to synthesize the IPv4 literal when there is not a default route available on an IPv4 addressed interface.

Now I am running into the MTU problem you mentioned above. I'm not on the TMobile network, but it’s a very similar configuration. I believe the issue is that the IP header is 40 bytes in IPv6 and therefore the payload needs to be reduced to allow the packets to traverse the NAT64. My VPN server is receiving ICMP Unreachables from IPv4 side of the NAT64 and my firewall on the VPN server permits them, but it seems as though the VPN server side doesn’t handle them properly for whatever reason, as it continues to send packets to the VPN client that are too big to fit through the NAT64.

I tried setting "mtu-disc yes" in the VPN server but it didn’t appear to have any affect. Do you have any advice on how to handle this scenario?

#5 lore raw

Hi,

Quoted 1 line · Kristian McColm

I tried setting "mtu-disc yes" in the VPN server but it didn???t appear to have any affect. Do you have any advice on how to handle this scenario?

mssfix 1300

(won't do anything for large UDP packets inside the tunnel, but will fix TCP. If you really need large UDP, try --fragment 1400 - but this needs to be turned on on both sides, OpenVPN server and client, and will cause some overhead)

The "I have no IPv4 default route so my local 464 component messes up IPv4 connections through the tunnel" is annoying, but not truly surprising.

(And the real culprit here is "Apps using IPv4 literals" - those are the ones to blaim that apple had to add that local "DNS64-like" component for IPv4 literals - which is now breaking the same apps in a VPN context)

But if "push default route" works as a workaround, this can be documented and things will be fine...

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#6 lore raw
Quoted 7 lines

mssfix 1300

(won't do anything for large UDP packets inside the tunnel, but will fix TCP. If you really need large UDP, try --fragment 1400 - but this needs to be turned on on both sides, OpenVPN server and client, and will cause some overhead)

Setting link-mtu 1440 fixes it for all protocols, but I am looking for a solution that is more graceful, such as PMTUD support. I don't see why it couldn't work, since the ICMP unreachable is sent to the VPN server with the appropriate MTU for the outer IP packet.

Since I am approaching this from the mobile network carrier perspective, and since we don't have control over VPN provider configs, I am looking for ways to mitigate the problem for our customers whose VPN's suddenly stopped working after they were migrated to IPv6-only.

Quoted 9 lines

The "I have no IPv4 default route so my local 464 component messes up IPv4 connections through the tunnel" is annoying, but not truly surprising.

(And the real culprit here is "Apps using IPv4 literals" - those are the ones to blaim that apple had to add that local "DNS64-like" component for IPv4 literals - which is now breaking the same apps in a VPN context)

But if "push default route" works as a workaround, this can be documented and things will be fine...

I'm not sure why it works, but it does. I assume the Apple hostname resolver APIs that do the IPv4 literal NAT64 synth have some logic to only do it when there is no IPv4 available. Maybe worth asking the question to Apple on exactly how this works before documenting anything.

A message that is not in the archive (sent off-list or not yet received): [email protected]...

#8 lore raw

Hi,

Quoted 8 lines · Kristian McColm
Quoted 6 lines

mssfix 1300

(won't do anything for large UDP packets inside the tunnel, but will fix TCP. If you really need large UDP, try --fragment 1400 - but this needs to be turned on on both sides, OpenVPN server and client, and will cause some overhead)

Setting link-mtu 1440 fixes it for all protocols,

This might also work, but is not without other caveats either.

Quoted 4 lines

but I am looking for a solution that is more graceful, such as PMTUD support. I don't see why it couldn't work, since the ICMP unreachable is sent to the VPN server with the appropriate MTU for the outer IP packet.

link-mtu will (if I'm not mistaken) cause "smaller outside fragments" on the tunnel UDP packets.

PMTUD might work, *if* you set "--mtu-disc maybe" or "--mtu-disc yes" on the server side. It's not a code path that has seen any love in the last 6 years or so, so it might be just fully broken - but I'm interested to hear about it.

Quoted 5 lines

Since I am approaching this from the mobile network carrier perspective, and since we don't have control over VPN provider configs, I am looking for ways to mitigate the problem for our customers whose VPN's suddenly stopped working after they were migrated to IPv6-only.

Provide a larger MTU than 1500 on the IPv6 side of things?

Quoted 7 lines
Quoted 7 lines

The "I have no IPv4 default route so my local 464 component messes up IPv4 connections through the tunnel" is annoying, but not truly surprising.

(And the real culprit here is "Apps using IPv4 literals" - those are the ones to blaim that apple had to add that local "DNS64-like" component for IPv4 literals - which is now breaking the same apps in a VPN context)

Quoted 8 lines
Quoted 2 lines

But if "push default route" works as a workaround, this can be documented and things will be fine...

I'm not sure why it works, but it does. I assume the Apple hostname resolver APIs that do the IPv4 literal NAT64 synth have some logic to only do it when there is no IPv4 available. Maybe worth asking the question to Apple on exactly how this works before documenting anything.

Yes.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...