IPv4 vs IPv6: what the difference means in practice

Most connections now run both IPv4 and IPv6 at the same time, but the two protocols behave differently in ways that affect privacy, troubleshooting and even VPN leaks.

The short version

IPv4 is a 32-bit address: about 4.29 billion possible values. IPv6 is 128-bit: effectively unlimited for practical purposes. IPv4 ran out of new addresses years ago, so carriers and networks reuse addresses with NAT. IPv6 was designed to give every interface a globally routable address without NAT.

Notation

NAT and why it matters

IPv4 NAT lets a whole home or office share one public address. It saves address space, but it also breaks inbound connections, complicates port forwarding and makes it harder to attribute traffic to a device. IPv6 removes the need for NAT in principle, but home routers still apply a stateful firewall, and many ISPs still route through layers of aggregation.

Carrier-grade NAT is a separate problem: mobile and some fixed-wireless customers share a single public address across many subscribers, which breaks port forwarding and makes IP-based blocks unreliable. See CGNAT explained.

Why you might see only one

IPv6 privacy addresses

Classic IPv6 autoconfiguration derived part of the address from the network card's hardware identifier, which made devices trackable across networks. Modern operating systems use temporary privacy addresses that change periodically. That is good for privacy, but it means an IPv6 address is a weaker identifier than an IPv4 address for logging or rate limiting.

Do not assume the IPv6 address a site sees is stable. If you need a stable identifier for a device, use an account or a device credential, not an address.

Testing

Open this site and look at the address version shown. If it says IPv6, your connection reached the server over IPv6. Then compare with a dedicated dual-stack test to see whether IPv4 also works. If IPv6 works without a VPN but fails with it, the VPN does not support IPv6.

On a server, check both families with your own API:

curl -4 -s https://wheremyip.com/api/ip?format=text
curl -6 -s https://wheremyip.com/api/ip?format=text

Do you need to care?

For browsing, mostly no: dual-stack networks fall back to IPv4. For security and privacy, yes. IPv6 is the most common VPN leak, it changes how you write firewall rules, and it makes address-based blocking less effective because a single device can have several addresses. If you run a service, support both families and log the version alongside the address, because the same client can appear as two different addresses.

For a practical checklist, see how to test a VPN for leaks.

Check your own connection

See your public IP address, inspect the headers your browser sends, or work out a network range with the subnet calculator. More background in the guides index.