ESC

Start typing to search across invoices, services, domains, tickets, and more...

Search... Ctrl+K
Network & IP

How to Configure an IPv6 Address on Linux and Windows Servers: Netplan, nmcli and Windows

6 steps 8 min read 5 views 0
On this page

If your provider has assigned an IPv6 address but the operating system did not pick it up automatically, you need to set it manually. This guide explains how to configure an IPv6 address on Linux and Windows servers: Ubuntu Netplan, Debian /etc/network/interfaces, nmcli on CentOS/Rocky/AlmaLinux, and Windows Server 2016/2019/2022, followed by testing with ping6 and curl -6.

Not every product includes IPv6 by default. Check the client area for the assigned IPv6 address, prefix and gateway: log in → My Products & Services → select the server → Manage; open a ticket to request or confirm it. The examples use 2001:db8:1234::10/64 with gateway 2001:db8:1234::1.

Step 1: Make Sure IPv6 Is Not Disabled

Some images disable IPv6 by default. Check the kernel setting:

sysctl net.ipv6.conf.all.disable_ipv6
ip -6 addr show

A value of 1 means IPv6 is disabled. Find the disable_ipv6=1 line in /etc/sysctl.conf or /etc/sysctl.d/, change it to 0 and run sysctl --system.

Step 2: Configure IPv6 on Ubuntu with Netplan

Edit the file in /etc/netplan/, add the IPv6 address to addresses and an IPv6 default route:

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 198.51.100.5/24
        - "2001:db8:1234::10/64"
      routes:
        - to: default
          via: 198.51.100.1
        - to: "::/0"
          via: "2001:db8:1234::1"
      nameservers:
        addresses: [8.8.8.8, "2001:4860:4860::8888"]
netplan try
netplan apply

Step 3: Configure IPv6 on Debian with /etc/network/interfaces

Append an inet6 stanza after the primary interface:

iface eth0 inet6 static
    address 2001:db8:1234::10/64
    gateway 2001:db8:1234::1
systemctl restart networking

Step 4: Configure IPv6 on CentOS, Rocky or AlmaLinux with nmcli

nmcli connection modify eth0 ipv6.method manual \
  ipv6.addresses 2001:db8:1234::10/64 \
  ipv6.gateway 2001:db8:1234::1
nmcli connection up eth0

Use nmcli connection show to find the connection name, which may differ from the device name.

Step 5: Configure an IPv6 Address on Windows Server

GUI: ncpa.cpl → right-click the adapter → Properties → Internet Protocol Version 6 (TCP/IPv6) → "Use the following IPv6 address", then enter the address, prefix length 64 and default gateway. Or run in an elevated PowerShell:

New-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6 -IPAddress 2001:db8:1234::10 -PrefixLength 64 -DefaultGateway 2001:db8:1234::1
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("8.8.8.8","2001:4860:4860::8888")

Step 6: Test IPv6 Connectivity with ping6 and curl -6

Linux:

ping -6 -c 4 2001:4860:4860::8888
curl -6 https://ifconfig.co

Windows:

ping -6 2001:4860:4860::8888
curl.exe -6 https://ifconfig.co

If curl returns your IPv6 address, outbound IPv6 works. Then ping the server's address from another IPv6-enabled host to confirm inbound reachability.

IPv6 has its own firewall rules. Linux iptables rules do not apply to IPv6; configure ip6tables separately or manage both with nftables/firewalld/ufw. Windows Firewall rules usually cover both protocols.

FAQ

I can ping the gateway but not the IPv6 internet.

Check for a default route with ip -6 route show default. If it is missing, verify the gateway in your Netplan or nmcli configuration.

What else do I need to serve a website over IPv6?

Add an AAAA DNS record pointing to the server's IPv6 address and make sure the web server listens on IPv6 (in Nginx: listen [::]:80;).

The IPv6 address changes or disappears after reboot.

Privacy extensions or SLAAC may be generating addresses. Use static configuration on servers and check whether cloud-init overwrites the network config.

Still stuck? Open a ticket with IMIDC 24/7 technical support.

Was this answer helpful?

Related Tutorials