Skip to content
Log In Sign Up info@muvcloud.com

The Main Differences

IPv4IPv6
Length32 bits128 bits
Example203.0.113.102001:db8::10
Loopback127.0.0.1::1
Typical LAN/24/64
NATCommonNot needed
DNS recordAAAAA
Neighbor lookupARPNDP over ICMPv6
Header20 to 60 bytes40 bytes, fixed

IPv4 has about 4.3 billion addresses, and the registries' pools of unused ones have long been exhausted. IPv6 has 2 to the power of 128, a number with 39 digits; in practice, the supply does not run out.

Reading an IPv6 Address

An IPv6 address is eight groups of four hexadecimal digits, separated by colons. Two rules make it shorter:

  • Leading zeros: 0db8 can be written db8.
  • One run of zero groups: can be replaced by ::, once per address.

So 2001:0db8:0000:0000:0000:0000:0000:0010 becomes 2001:db8::10. The first 64 bits usually name the network and the last 64 bits the interface, which is why a single LAN segment is a /64. A server is often given a whole /64, enough for any number of addresses. In a URL, an IPv6 address goes in square brackets: http://[2001:db8::10]:8080/. Prefix lengths work the same way as in IPv4, see CIDR notation.

No NAT Needed

With IPv4, private ranges and NAT stretch the address supply (see public vs private IP). With IPv6, every device can have a globally unique address and be reached directly. That removes the problems NAT causes, and it also removes the accidental protection NAT gave: an IPv6 address that is reachable is reachable from everywhere, so the firewall does all the filtering.

Dual Stack on a Server

A dual-stack server has an IPv4 and an IPv6 address and answers on both. Clients that have IPv6 usually try it first and fall back to IPv4 within a fraction of a second if it fails. Your server keeps working for everyone, as long as both stacks are set up consistently.

On Your Server: Check IPv6

ip -6 a
ip -6 r
ping -6 -c 4 example.com
curl -6 -I https://example.com
  • scope global: a public IPv6 address. A line with only fe80:: and scope link is link-local and does not reach the internet.
  • default via in ip -6 r: without a default route there is no IPv6 internet access, even with an address.
  • ping -6 and curl -6: force IPv6. If they fail while the IPv4 versions work, the problem is in the IPv6 setup.
  • sudo ss -tlnp: a service listening on [::]:443 accepts IPv6 connections.

What Must Exist Twice

  • Firewall rules: ufw applies its rules to both while IPV6=yes is set in /etc/default/ufw, which is the default, and firewalld covers both. With iptables, IPv6 rules live separately in ip6tables; an nftables table of the inet family covers both.
  • DNS records: an A record for IPv4 and an AAAA record for IPv6.
  • Listen lines: Nginx needs listen [::]:443 ssl; next to listen 443 ssl;.
  • Monitoring: check the site over both protocols, or an IPv6 outage goes unnoticed.
  • Reverse DNS: a mail server that sends over IPv6 needs a PTR record for that address too.

Common Problems

  • AAAA record without working IPv6: some visitors get slow or failed connections. Publish the AAAA record only after curl -6 works from outside.
  • ICMPv6 blocked completely: IPv6 needs ICMPv6 for neighbor discovery and path MTU discovery. Allow it: ufw and firewalld let the needed types through in their default setup, while hand-written nftables or ip6tables rules must allow it themselves.
  • Logs and blocklists: tools that only parse IPv4 addresses miss IPv6 clients. Check that your log analysis and ban tools handle both.

For the everyday commands behind these checks, see Linux network commands.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations