Skip to main content
To configure IPv6 on Ubuntu Server, add your IPv6 address (for example "2001:db8::10/64") under addresses in your Netplan file and a route - to: default via: "2001:db8::1" using the gateway your provider gives you, then run sudo netplan try. On AlmaLinux/Rocky use nmcli with ipv6.method manual. Test with ping -6 -c 3 example.com.

Before you start

  • IPv6 is the newer internet address format, written in hexadecimal groups like 2001:db8::10. :: means “all zeros here”. The /64 after it is the prefix length.
  • Get your IPv6 address and gateway. On a VPS they’re in the IPv6 table on the Network tab of the VPS Panel; if there’s no IPv6 table, your server has no IPv6 range.
  • Open the VNC console first. A mistake in the network file can drop IPv4 too.
  • Commands use sudo; as root, leave it out.

How to check if IPv6 already works

If you see a global address (starting with 2 or 3), a default route and replies, IPv6 already works. If you only see fe80:: addresses, configure it below. Also check IPv6 isn’t switched off in the kernel:
= 0 means enabled. If it shows 1, look for the setting in /etc/sysctl.conf and /etc/sysctl.d/, remove it, and run sudo sysctl --system.

How to add a static IPv6 address

1

Edit the Netplan file

Add the IPv6 address and a second default route:
If the gateway is outside your IPv6 prefix, add on-link: true under the IPv6 route.
2

Test and apply

Open a new SSH session; if it connects, press Enter in the first one.

How to check it worked

Then test from outside: ping 2001:db8::10 from another IPv6-enabled machine, or check the service you run.

Does my firewall cover IPv6?

  • UFW (Ubuntu): IPV6=yes in /etc/default/ufw is the default, so ufw allow rules apply to both IPv4 and IPv6. Check with grep IPV6 /etc/default/ufw.
  • firewalld (AlmaLinux/Rocky): zones apply to IPv4 and IPv6.
  • iptables: IPv6 rules are separate and use ip6tables. See nftables and iptables.
With IPv6 configured, your services can be reached on the IPv6 address as well. Make sure your firewall rules cover IPv6 before you open services such as databases.

Frequently asked questions

Why does ping -6 to an address work but not to a domain name?

The domain may have no IPv6 address. Check for an AAAA record with dig AAAA example.com +short. If it returns nothing, that site isn’t reachable over IPv6 and your setup is fine.

Do I need to put the IPv6 address in quotes in Netplan?

No. Netplan 1.1 on Ubuntu 24.04 reads - 2001:db8::10/64 with or without quotes. Quotes do no harm and make the value clearly a string, so this guide uses them.

How do I add more IPv6 addresses from my range?

Add more lines under addresses (Netplan), use +ipv6.addresses with nmcli, or add more inet6 stanzas (Debian). Each must be from the range assigned to your server.

Should I disable IPv6 if I don’t use it?

You don’t have to. Check ip -6 addr show scope global: if it shows no address, the server can’t be reached over IPv6 from the internet. If it does, make sure your firewall covers IPv6.

VPS and dedicated server guides

Every guide in this section.

Static IP with Netplan

Full Netplan setup on Ubuntu.

Add more IP addresses

Extra IPv4 or IPv6 addresses.

Point a domain to your server

Add an AAAA record.

Enable IPv6 on Windows Server

The same task on Windows.

Reverse DNS

Set a PTR record for your IPv6 address.

Checked against the official Netplan documentation, Red Hat Enterprise Linux 9 networking guide and Debian’s interfaces(5) manual on 4 November 2026; the Netplan example was validated with netplan generate (Netplan 1.1.2) and the UFW default checked on Ubuntu 24.04 LTS. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026