About ipv4 - ipv6 issue

hi guys, now we start to use CF but we have some ipv4 and ipv6 compatibility problem. Our problem is - before CF: The devices (web/mobile) are providing ipv4 and ipv6. Heroku and our third part payment company only support ipv4, therefore the only thing being used was ipv4.

  • after CF : Now that Cloudflare is in place, it can handle both ipv4 and ipv6 coming from the devices. BUT if it passes along an ipv6 to heroku and our payment company, it won’t work. Cloudflare’s documentations say that if it sees ipv4 and ipv6 it will prefer ipv4, but it doesn’t seem to be doing that, it seems to be prioritizing ipv6, which is where it causes the problem.

how can we fix this problem on Cloudflare side.

You are talking about the IP address which Cloudflare forwards in the request header, right?

In that case, Cloudflare is not preferring either but will simply forward mentioned address. If it receives a request from an IPv6 address, it will obviously forward that address to your server.

What you can do is enable Pseudo IPv4 - https://support.cloudflare.com/hc/en-us/articles/229666767-Understanding-and-configuring-Cloudflare-s-IPv6-support#h_877db671-916a-4085-9676-8eb27eaa2a91

This will force the IPv6 address into an IPv4 one, however that won’t be a properly valid address, as it will be from a private address block. If this is okay with your services, that should work.

Otherwise you could only upgrade to a paid plan, where you have the option to disable IPv6 via the API


thank you.we will try

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