Creating a IPv6 to IPv4 proxy server in Google compute engine

9/3/2017

I have an ios app that needs an API to works yet this API is deployed using Kubernetes that doesn't support IPv6 for now.

I am intending to create proxy server that do the redirection of packets to the actual api. How could be done using google compute engine? A load balancer?

-- bigOther
google-compute-engine
ipv6
kubernetes
proxy

2 Answers

9/4/2017

You do not need a proxy but a reverse-proxy. Therefore, yes a load balancer is a way to comply to your need. Do not forget to configure the DNS with the IPv4 and IPv6 addresses of the load balancer.

But when you say I have an ios app that needs an API to works [...] support IPv6. If what you are saying is based on the fact that Apple wants iOS apps in their store to support IPv6, note that having an IPv6 server is not compulsory. Apple expects your client application to work correctly when connected to an IPv6-only network, but that IPv6-only network MUST help your application by offering a DNS resolver that is DNS64 compliant and also offering a NAT64 IPv6-to-IPv4 translation gateway. This means your client application makes a DNS request to www.myipv4onlyserver.com and the resolver replies with a fake IPv6 address routed to a NAT64 gateway. Thus, your client application talks with IPv6 to this gateway and this gateway translates the data channel to your IPv4 server, like a transparent proxy.

So, to be compliant with Apple expectations, if you only use high-level network libraries and address-agnostic APIs, such as getaddrinfo() and getnameinfo(), then you do not need to support IPv6 on the server side.

-- Alexandre Fenyo
Source: StackOverflow

9/10/2017

At the moment, GCE instance don't support IPv6, so you cannot terminate IPv6 on an instance or set up the (reverse) proxy yourself.

However Google Cloud HTTP(S), SSL and TCP proxy do support IPv6. You could use this to accept IPv6 connections and forward them to your GKE nodes. It might even be possible to do this with the HTTP LB created as part of a Kubernetes Ingress, and thus have it automatically connected to the correct pods.

-- David
Source: StackOverflow