Configuring IPv6 on Your Dedicated Server
Many dedicated servers include a block of IPv6 addresses. This guide covers enabling and using IPv6.
Check if IPv6 is Assigned
ip addr show
Look for an address starting with 2 or fe80 on your main interface. If present, IPv6 is already configured.
Configure IPv6 with Netplan (Ubuntu)
nano /etc/netplan/00-installer-config.yaml
network:
version: 2
ethernets:
eth0:
addresses:
- 203.0.113.10/24
- 2001:db8::1/64
gateway4: 203.0.113.1
gateway6: 2001:db8::1
nameservers:
addresses:
- 1.1.1.1
- 2606:4700:4700::1111
netplan apply
Test IPv6 Connectivity
ping6 2606:4700:4700::1111 # Ping Cloudflare's IPv6 DNS
curl -6 https://ipv6.icanhazip.com
Allow IPv6 in UFW
nano /etc/default/ufw
# Ensure:
IPV6=yes
ufw allow in on eth0 to any proto tcp port 80
ufw allow in on eth0 to any proto tcp port 443
Add AAAA Record for Your Domain
Type: AAAA
Name: @
Value: 2001:db8::1
Test with dig
dig AAAA yourdomain.com