How do I redirect incoming IPv6 connections to my domain to an IPv4 server address and back?

I am hosting a few servers for video games on my personal network which utilizes Spectrum’s internet service. The public IPv4 address provided by Spectrum is a shared IP belonging to a node behind a CGNAT based network. As a result of this IPv4 clients can not connect directly to my server and I can not route the traffic from the node as I do not have access to it. However, my server does also have IPv6 access and IPv6 does not require or make use of CGNAT routing protocol. The domain I own through Cloudflare has both an A and AAAA DNS record for both my server’s IPv4 and IPv6 addresses. How would I make it so that any IPv6 clients that attempt to connect to this domain are automatically routed to my server? I understand that IPv6 based clients could directly connect to the IPv6 IP held by the server without issue however the client platform I am attempting to use does not allow IPv6 entries in the connecting address input, clients can only input an IPv4 address or a web domain address. Ideally they would input the domain address for my domain as their server address or the web domain’s IPv4 address and be routed to the server regardless.

I know very little about web development and server or network infrastructure from a practical application point of view. I understand much of the technological theory do to the nature of the professional work I do but if you have any advice please just assume I don’t know anything about how to achieve this.

1 Like

Update: I have come to the understanding that I could achieve this using proxied NAT via a DNS64/NAT64 record synthesis and translation. However, I do not have any hardware with NAT64 support. Is it possible to use Cloudflare as a proxy for this so that the network traffic routed to the server is of the appropriate IP protocol type regardless of what protocol a client is using to connect?

If you have a server that should be accessed only via IPv6, use the Cloudflare proxy and only add an AAAA record for it; don’t add an IPv4 address at all. Then clients can connect to the proxy via IPv4 or IPv6, but Cloudflare will contact your origin only via IPv6.

I do this when setting up a website that will use the proxy. I add a new IPv6 address to my server (I have millions of the things, so why not?) and have that site listening only on an IPv6 address, only on port 443, and the Cloudflare proxy only contacts my server that way. But IPv4 clients can hit the proxy just fine.

1 Like

So that does make sense and I should’ve been more clear about this in the original post which I will correct now, the game services I host for do not natively support IPv6. This means even if the traffic from them was routed to the server via IPv6 it would not be approriately translated and thus would be unusable to the client on return.

It’s a bit of a moot point, anyway, since Cloudflare only proxies HTTP and HTTPS traffic.

2 Likes
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.