1 year PowerDedi turns 1: −20% on every server with code Ends in 14 h Claim offer

PowerDedi

Networking

Configure IPv6 on your server

Put your routed /64 to work: pick an address, set the fe80::1 gateway, test connectivity and add more addresses.

Updated September 25, 2026 · 3 min read · 9 sections

On this page 9 sections
  1. How your /64 works
  2. Choose an address
  3. Debian: ifupdown
  4. Ubuntu: Netplan
  5. AlmaLinux and Rocky Linux: NetworkManager
  6. FreeBSD: rc.conf
  7. Test connectivity
  8. Add more addresses
  9. Request a /56

Every server includes a routed /64 IPv6 prefix. This guide shows how to configure an address from it, test connectivity and add more addresses. You need root access over SSH and your prefix, shown in the Network tab of your server in the client area.

How your /64 works

Your prefix, for example 2001:db8:1234:5678::/64, is routed to your server, and every address in it is yours to use. The gateway is always fe80::1, a link-local address reached through your primary network interface. Addresses are configured statically. Find your interface name and check what is already set up:

ip -br link
ip -6 addr show scope global
ip -6 route show default

If an address from your prefix and a default route via fe80::1 are already listed, IPv6 works; skip to the testing section. The examples below use enp1s0f0 as the interface: replace it with yours.

Choose an address

Any address in the prefix works. Short ones such as 2001:db8:1234:5678::2 are easy to read and to put in DNS. Assign it with the prefix length /64. Avoid the all-zero address, 2001:db8:1234:5678::, which is reserved as the subnet-router anycast address.

Debian: ifupdown

Add an inet6 stanza for the interface to /etc/network/interfaces, below the existing IPv4 stanza:

iface enp1s0f0 inet6 static
    address 2001:db8:1234:5678::2/64
    gateway fe80::1

The file takes effect at the next boot. To apply the same settings now without restarting networking, add them by hand:

sudo ip -6 addr add 2001:db8:1234:5678::2/64 dev enp1s0f0
sudo ip -6 route add default via fe80::1 dev enp1s0f0

On Proxmox VE, put the stanza on the vmbr0 bridge instead of the physical interface, and apply it with ifreload -a.

Ubuntu: Netplan

Edit the existing YAML file in /etc/netplan/; its name varies. Add the IPv6 address to addresses and an IPv6 default route to routes, and leave your IPv4 lines as they are:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0f0:
      addresses:
        - 203.0.113.10/32                # existing IPv4, keep yours
        - "2001:db8:1234:5678::2/64"     # new
      routes:
        - to: default                    # existing IPv4 route, keep yours
          via: 203.0.113.1
          on-link: true
        - to: default                    # new
          via: "fe80::1"

Apply it with a safety net:

sudo netplan try

netplan try applies the change and rolls it back after 120 seconds unless you press Enter to confirm, so a typo can’t lock you out.

AlmaLinux and Rocky Linux: NetworkManager

Find the connection name, which is often the interface name, then add the address and the gateway to it:

nmcli -f NAME,DEVICE connection show --active
sudo nmcli connection modify enp1s0f0 ipv6.method manual \
    ipv6.addresses 2001:db8:1234:5678::2/64 ipv6.gateway fe80::1
sudo nmcli connection up enp1s0f0

NetworkManager saves the change permanently. Reactivating the connection interrupts traffic for a moment; an open SSH session normally survives it.

FreeBSD: rc.conf

Write the settings to /etc/rc.conf with sysrc, replacing ix0 with your interface from ifconfig:

sysrc ifconfig_ix0_ipv6="inet6 2001:db8:1234:5678::2 prefixlen 64"
sysrc ipv6_defaultrouter="fe80::1%ix0"

They apply at the next boot, or at once with service netif restart && service routing restart. That command briefly drops all connections, so run it from the console.

Test connectivity

ping -6 -c 3 fe80::1%enp1s0f0
ping -6 -c 3 2606:4700:4700::1111
curl -6 https://icanhazip.com

The first command tests the gateway, the second a public address (Cloudflare’s DNS resolver), and the third prints the address the internet sees, which should be the one you configured. If the gateway doesn’t answer, check the interface name, and make sure your firewall allows ICMPv6: IPv6 needs it for neighbor discovery and path MTU discovery. Finally, test from another IPv6-connected machine with ping -6 2001:db8:1234:5678::2, and add an AAAA record for your hostname.

Add more addresses

  • Debian: add another iface enp1s0f0 inet6 static stanza containing only an address line. ifupdown applies every stanza for the interface when it comes up. To use the address right away, also add it with ip -6 addr add.
  • Ubuntu: add entries to the addresses list, then run sudo netplan try.
  • AlmaLinux and Rocky Linux: run sudo nmcli connection modify enp1s0f0 +ipv6.addresses 2001:db8:1234:5678::3/64, then reactivate the connection.

With several addresses, the kernel chooses the source address of outgoing connections. Services that must use a specific address, such as a mail server, should set it in their own configuration.

Request a /56

A /56, which holds 256 networks of /64, is free on request. It is useful when each virtual machine bridge, container network or customer should get its own /64. Ask for it with a support ticket from your client area.

Related guides

All guides