IPv6 is the next-generation internet protocol that provides a vastly larger address space than IPv4. LightYear servers support dual-stack networking (IPv4 and IPv6 simultaneously).
Check IPv6 Assignment
$ip -6 addr show2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 2001:db8:1234:5678::1/64 scope global dynamic mngtmpaddr
valid_lft 86400sec preferred_lft 14400sec
inet6 fe80::1/64 scope linkTest IPv6 Connectivity
$ping6 -c 4 ipv6.google.comPING ipv6.google.com(2404:6800:4003:c00::8a (2404:6800:4003:c00::8a)) 56 data bytes
64 bytes from 2404:6800:4003:c00::8a: icmp_seq=1 ttl=118 time=1.23 ms
64 bytes from 2404:6800:4003:c00::8a: icmp_seq=2 ttl=118 time=1.19 msConfigure Nginx for IPv6
server {
listen 80;
listen [::]:80; # IPv6
listen 443 ssl;
listen [::]:443 ssl; # IPv6 SSL
server_name example.com;
# ... rest of config
}Add an AAAA DNS Record
Add your server's IPv6 address to DNS:
| Type | Name | Value | TTL |
|---|---|---|---|
| AAAA | @ | 2001:db8:1234:5678::1 | 300 |
| AAAA | www | 2001:db8:1234:5678::1 | 300 |
Verify:
$dig example.com AAAA +short2001:db8:1234:5678::1Configure UFW for IPv6
Edit /etc/default/ufw:
IPV6=yesReload UFW:
$ufw reloadUFW rules added with ufw allow automatically apply to both IPv4 and IPv6.
[!NOTE] IPv6 addresses are assigned automatically by LightYear's DHCP6 service. You do not need to configure static IPv6 addresses manually.
