On this page
Every FlexDedi server includes a /64 IPv6 block alongside its IPv4 address. This guide assigns an address from the block, adds the IPv6 default route, tests both directions and sets reverse DNS.
Examples use the documentation prefix 2001:db8:1234:5678::/64, the address ::2 for the server and ::1 as the gateway. Use the prefix and gateway listed with your server's network details in the control panel.
About your /64
A /64 contains 2^64 addresses, and every one of them can be used on this server. A simple plan works well: ::2 for the host, then ::10, ::11 and so on for services that need their own address.
Use static addresses on servers, so firewall rules and DNS records stay valid. Remember that IPv6 needs its own firewall rules, and do not block ICMPv6 entirely: neighbor discovery and path MTU discovery depend on it. ufw covers both protocols with its default IPV6=yes.
1. Check the current state
ip -br link
ip -6 addr show scope global
ip -6 route show defaultThe first command gives your interface name, such as enp1s0f0. If a global address from your block and a default route already appear, go straight to step 5.
2. Ubuntu 24.04 with Netplan
Ubuntu keeps its network configuration in YAML files under /etc/netplan. Edit the existing file rather than defining the same interface in a second one:
ls /etc/netplan/Keep your IPv4 lines as they are and add the IPv6 address, the IPv6 route and accept-ra: false, which stops router advertisements from adding extra addresses or routes:
network:
version: 2
ethernets:
enp1s0f0:
accept-ra: false
addresses:
- 203.0.113.10/24
- "2001:db8:1234:5678::2/64"
routes:
- to: default
via: 203.0.113.1
- to: "::/0"
via: "2001:db8:1234:5678::1"If your gateway is outside your /64, add on-link: true under that route.
If the file is named 50-cloud-init.yaml and its header says cloud-init generated it, stop cloud-init from rewriting it at the next boot:
echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfgThen apply the change safely. netplan try reverts automatically after 120 seconds unless you press Enter, so a mistake cannot lock you out:
chmod 600 /etc/netplan/*.yaml
netplan try3. Debian with /etc/network/interfaces
If /etc/netplan is empty and your interface is defined in /etc/network/interfaces, add an IPv6 stanza below the existing IPv4 one:
iface enp1s0f0 inet6 static
address 2001:db8:1234:5678::2/64
gateway 2001:db8:1234:5678::1
accept_ra 0Restarting networking over SSH can drop your session, so test with temporary settings first:
ip -6 addr add 2001:db8:1234:5678::2/64 dev enp1s0f0
ip -6 route add default via 2001:db8:1234:5678::1 dev enp1s0f0Once the tests in step 5 pass, the saved stanza takes over at the next reboot. To apply it immediately, run systemctl restart networking from the KVM console.
4. Windows Server
In an elevated PowerShell, find the adapter name, assign the address with its gateway, and allow inbound ICMPv6 echo, which Windows blocks by default:
Get-NetAdapter
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 2001:db8:1234:5678::2 -PrefixLength 64 -DefaultGateway 2001:db8:1234:5678::1
Enable-NetFirewallRule -Name FPS-ICMP6-ERQ-InReplace Ethernet with the name shown by Get-NetAdapter. The same settings are available in the GUI: run ncpa.cpl, open the adapter's properties and edit Internet Protocol Version 6 (TCP/IPv6).
5. Test the connection
From the server, check outbound IPv6. The second command should print the address you configured:
ping -6 -c 4 one.one.one.one
curl -6 https://icanhazip.comOn Windows, use ping -6 one.one.one.one and curl.exe -6 https://icanhazip.com.
Then test inbound from another machine with IPv6, for example with ping -6 2001:db8:1234:5678::2 or ssh root@2001:db8:1234:5678::2. If outbound works but inbound does not, check the server's firewall. If nothing works, check the prefix length and the gateway address.
6. Request reverse DNS
Reverse DNS maps an address back to a host name. Mail servers check it, and it makes logs and traceroutes easier to read.
- Create the forward record first: an AAAA record such as
mail.example.compointing to2001:db8:1234:5678::2, at your DNS provider. - In the control panel, open your server, choose Reverse DNS, enter the IPv6 address and the host name, and save.
- Verify both directions once the change is visible:
dig -x 2001:db8:1234:5678::2 +short
dig AAAA mail.example.com +shortThe first command should return mail.example.com. and the second your address. Set reverse DNS for each address you actually use rather than for the whole block.
Next steps
If you plan to run virtual machines on this server, see Proxmox VE on a dedicated server. To connect servers without using public addresses at all, see Connect servers over a private VLAN.