We are currently trying to include a voting system on our website, to verify that a player has voted, we must verify his vote using his IPv4, however in some players we notice that the server recovers the IPv6 of player, despite using Cloudflare module on apache with variable → HTTP_CF_CONNECTING_IP
How can we proceed in order to retrieve only the IPv4 of the players?
This will map IPv6 addresses to IPv4 ones as closely as possible, either in an additional header (Cf-Pseudo-IPv4) or by overwriting Cf-Connecting-IP. It won’t be perfect, but it’s the best you’ll be able to get if you require IPv4 addresses instead of IPv6 ones.
I would generally recommend that you update your website to support IPv6 addresses though, as it’s becoming increasingly common.