LightYear
/Docs
DocsNetworkingConfigure IPv6 on Your Server

Configure IPv6 on Your Server

Enable and configure IPv6 networking on Ubuntu 22.04 to support dual-stack connectivity.

intermediate
7 min read
LightYear Docs Team
Updated April 24, 2026
ipv6networkingdual-stackubuntu
Ready to get started?

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

>_BASH
$ip -6 addr show
OUTPUT
2: 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 link

Test IPv6 Connectivity

>_BASH
$ping6 -c 4 ipv6.google.com
OUTPUT
PING 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 ms

Configure Nginx for IPv6

NGINX
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:

TypeNameValueTTL
AAAA@2001:db8:1234:5678::1300
AAAAwww2001:db8:1234:5678::1300

Verify:

>_BASH
$dig example.com AAAA +short
OUTPUT
2001:db8:1234:5678::1

Configure UFW for IPv6

Edit /etc/default/ufw:

INI
IPV6=yes

Reload UFW:

>_BASH
$ufw reload

UFW 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.

Was this article helpful?

Your cookie choices for this website

This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, and enhanced user experience. You may choose to consent to our use of these technologies, or manage your own preferences. Cookie policy