2

Now that apple has changed their review environment to an IPv6 only network ive been running into troubles with my application while testing.

The application requires the user to input their server/systems IP address, port (4401) and credentials to gain access to the application. Following the guidelines provided by apple i set up a NAT64 environment to test my application's compatibility. Running iOS 9.3.2 on an iphone 5s.

My work environment has several internal networks. I connected my iMac to the internal server (10.10.50.XX) via Ethernet which also has an external IP which is what i provide to apple. The 50 network does not run behind a proxy, but there are some sites which get filtered, but can access by confirming. I then shared my Ethernet connection through WiFI.

I connected the device and had internet access with the same pages being filtered. The device gets assigned a local-link address of 169.254.XX.XX. From what ive read my device is connecting to the ipv6 only network correctly, as the iphone does not show the ipv6 address only local link.

If I am correctly connected to the shared IPv6 network, the problem I am having is connecting to my server on the 50 network from my application. The application fails when ever i try to connected to the 10.10.50.XX network or the external(understandable because my imac is on the 50 internal network) .

Testing the application using IPv4 with a wireless router that is connected to the 50 network runs perfectly.I think it is an issue with the local link address not being able to see the 50 network or something.

Heres some brief background info on how i connect to the server. The user inputs all the credentials and the IP address and port of the server they want to connect to. The application saves this as a text (utf-8) and uses boost shared_ptr to send it to the cpp connection class which validates the credentials and provides access to the user. This cpp connection class handles the connection, synchronization, logging, requests and response from the server.

Is it possible to somehow get access to the 50 network, using the NAT64 internet sharing option?

3rdeye7
  • 536
  • 4
  • 25
  • How does your "cpp connection class handle the connection, synchronization, logging, requests and response from the server"? – user102008 Jul 09 '16 at 00:48

1 Answers1

1

If you're passing an IP address straight down to your network lib, then no. When your device is on the IPv6-only side of the NAT64, the server's IPv4 address is useless.

You almost certainly need a DNS name for the server you're trying to reach. The NAT64 relies first on DNS64 to create IPv6 addresses for your application when the server is IPv4-only. These synthesised addresses contain the IPv4 address(es) for the server, giving the NAT64 the information it needs to translate from IPv6 to IPv4.

Updating this to add: as suggested by user102008 in the comment thread attached to this answer, you may also be able to pass the IPv4 string literal though getaddrinfo() (see code listing 10-1 on this page). When you're behind a NAT64, a synthesised IPv6 address should be among the results returned by that call. The NAT64 will translate from this address back to IPv4 to reach the host you specified. In this case, if the system knows the correct prefix to use for the NAT64, a hostname is not necessary.

Stephen
  • 283
  • 1
  • 6
  • "You almost certainly need a DNS name for the server you're trying to reach." This is not true. You can connect to IPv4 address literals from IPv6-only networks. – user102008 Jul 12 '16 at 22:02
  • Only iff your app/lib knows the NAT64 prefix in use, and your app/lib synthesises IPv6 addresses to reach the NAT64 much like DNS64 does. Then, you can send IPv6 packets to the NAT64, and the NAT64 can translate to IPv4. You certainly can't punt an IPv4 packet into an IPv6-only network and expect it to go anywhere – Stephen Jul 12 '16 at 22:23
  • Or ask the system APIs to synthesize it for you. My point is, a hostname is not necessary. – user102008 Jul 12 '16 at 23:06
  • Agreed, provided that *something* has the means to learn the Pref64 in use. If you can provide a pointer on the correct OSX hooks to achieve that, that'd be a great answer! – Stephen Jul 12 '16 at 23:14
  • Oh, I see an example in Apple's docs; they've augmented getaddrinfo(). I think they're using PCP under the hood (at least, I hope so). I'll update this answer. – Stephen Jul 12 '16 at 23:41
  • @Stephen " The NAT64 will translate from this address back to IPv4 to reach the host you specified. In this case, if the system knows the correct prefix to use for the NAT64, a hostname is not necessary." . By this do you mean, that i need to make changes on my server/system that i am trying to connect too? – 3rdeye7 Jul 13 '16 at 15:13
  • No. If the client system can learn the NAT64 prefix, it'll happen locally. NAT64 is transition tech designed to make client-side v6 possible even when a server isn't available over v6 yet: no changes necessary there for this. (However, if you were to modify the server, adding IPv6 would be a good choice!) – Stephen Jul 13 '16 at 15:27