Docs / Networking / Understanding IPv6 on Your Server

Understanding IPv6 on Your Server

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 29 views · 1 min read

Why IPv6?

IPv4 addresses are exhausted. IPv6 provides a virtually unlimited address space (340 undecillion addresses). Many providers now assign IPv6 alongside IPv4.

Check IPv6 Status

# Show IPv6 addresses
ip -6 addr show

# Test IPv6 connectivity
ping6 -c 4 google.com

# Check if IPv6 is enabled
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Configure a Static IPv6 Address

Using Netplan (/etc/netplan/01-config.yaml):

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 198.51.100.10/24
        - "2001:db8::10/64"
      routes:
        - to: default
          via: 198.51.100.1
        - to: "::/0"
          via: "2001:db8::1"
sudo netplan apply

Firewall for IPv6

# UFW handles both IPv4 and IPv6 by default
sudo ufw allow ssh
sudo ufw enable

# Verify
sudo ufw status verbose
# Should show rules for both v4 and v6

Web Server Configuration

# Nginx — listen on IPv6
server {
    listen 80;
    listen [::]:80;
    server_name example.com;
}

DNS Records

Add AAAA records alongside A records:

example.com.  IN  A     198.51.100.10
example.com.  IN  AAAA  2001:db8::10

Was this article helpful?