"Can a VPS be assigned an IPv6 address?"—The answer is yes. Most mainstream VPS providers support IPv6, and many newly created instances are assigned an IPv6 address by default.
However, the problem is: assignment doesn't equal configuration, and configuration doesn't mean it's usable. Many users see an IPv6 address in their control panel and assume everything is fine, only to find their websites still inaccessible and ping times out. This article will explain the complete process from "assignment" to "usability."
First, confirm that your provider has assigned an IPv6 address.
Before actually configuring, confirm that your VPS has obtained a publicly accessible IPv6 address.
After logging into the server, execute:
ip -6 addr show
ip -6 route show
If the network interface card only has an address starting with `fe80::`, that's a link-local address, only usable within the same Layer 2 network, and not directly usable for public access. You need to check in the control panel whether IPv6 is enabled for your instance and record the address, prefix length, and default gateway assigned by the platform. Common prefixes include `/64` and `/128`: `/64` is more common for complete subnet allocations, while `/128` typically represents a single host address.
If there are no IPv6-related options in the control panel, it means your service provider does not support or has not enabled it. In this case, you can contact customer service to confirm.
Configuring IPv6 on Linux Systems (Coverage of Mainstream Distributions)
After confirming the address, proceed to system configuration. The configuration methods differ for different Linux distributions; the following instructions are provided for each distribution.
CentOS 8 / Rocky Linux / AlmaLinux
Assume the network adapter name is `ens3`. Modify `/etc/sysconfig/network-scripts/ifcfg-ens3`:
TYPE="Ethernet"
DEVICE="ens3"
ONBOOT="yes"
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
Restart the network:
nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens3
nmcli con up 'System ens3'
CentOS 6-7
Modify `/etc/sysconfig/network-scripts/ifcfg-eth0`:
IPV6INIT="yes"
IPV6ADDR="2001:db8:1000::100/64"
IPV6_AUTOCONF="yes"
Restart the network:
service network restart
Ubuntu 17-20 (Netplan)
Modify `/etc/netplan/10-ens3.yaml`:
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: yes
addresses:
- '2001:db8:1000::200/64'
Executing `sudo netplan try` will first verify the configuration and give you one automatic rollback opportunity—suitable for remote operations, avoiding SSH disconnection due to incorrect gateway settings. After confirming everything is correct, execute `sudo netplan apply`.
Ubuntu 22.04/24.04 (Netplan including routing configuration)
If you need to configure a default route as well, please refer to the following configuration snippet:
network:
version: 2
ethernets:
eth0:
dhcp4: true
addresses:
- "2001:db8:1::10/64"
routes:
- to: "::/0"
via: "2001:db8:1::1"
Similarly, first execute `sudo netplan try` to confirm that the connection will not be lost before applying the changes.
Debian 9-10
Add the following code to the `/etc/network/interfaces` file:
Dynamically obtain:
iface ens3 inet6 auto
Statically configure:
iface ens3 inet6 static
address 2001:db8:1000::100
netmask 64
Restart the network:
systemctl restart networking.service
Fedora 29-32
Configure via nmcli command line:
nmcli con mod 'Wired connection 1' ipv6.method 'auto' ipv6.addresses ''
nmcli con mod 'Wired connection 1' +ipv6.addresses '2001:db8:1000::200/128'
nmcli con up 'Wired connection'` 1
General Check: Confirm the kernel does not disable IPv6
If the system kernel has IPv6 disabled, even correct addresses and routes will not work. Execute the following command to check:
sysctl net.ipv6.conf.all.disable_ipv6
A return value of `0` indicates IPv6 is enabled, and a return value of `1` indicates it is disabled. If adjustments are needed, change the corresponding value in `/etc/sysctl.conf` to 0, and then execute `sudo sysctl -p`.
Temporarily Add a Default Route (for verification)
If the server already has a global IPv6 address but public network testing fails, first check the routing table:
ip -6 route show | grep default
If there is no output, you can temporarily add a default route for verification:
sudo ip -6 route add default via your IPv6 gateway dev eth0
ping6 -c 3 2001:4860:4860::8888
Note: The IPv6 gateway here must be replaced with the actual gateway address provided by the console or your service provider. If connectivity is restored after adding a temporary route, the problem lies in the persistent network configuration, which needs to be written to the network interface card (NIC) configuration file.
Configuring IPv6 on Windows Systems
Configuring on Windows systems is relatively intuitive and is primarily done through a graphical interface.
After logging into the Windows cloud server, go to "Control Panel" → "Network and Internet" → "Network and Sharing Center," and click the corresponding Ethernet adapter to edit it. In the Ethernet status pop-up window, click "Properties" in the lower left corner. In the properties pop-up window, select "Internet Protocol Version 6 (TCP/IPv6)," and then click "Properties."
In the pop-up window, manually enter the IPv6 address assigned to the cloud server by the system. If you are unsure of the address, you can view it on the instance details page or elastic NIC details page of the cloud service provider's console. You can also configure the IPv6 protocol DNS server as needed (if not configured, the default DNS server configured for IPv4 protocol will be used for domain name resolution).
After configuration, open a Windows PowerShell window and use the following commands to check the configuration's effectiveness and test connectivity:
ipconfig /all
ping -6 www.qq.com
Note: By default, the IPv6 address configured on the cloud server only has IPv6 internal network communication capabilities. To access or be accessed from the public IPv6 network, you also need to enable public network bandwidth according to your service provider's instructions.
Add DNS AAAA Record
The system's ability to access IPv6 does not mean the domain name can already use IPv6. You also need to add an AAAA record in the DNS resolution panel.
- A record pointing to an IPv4 address
- AAAA record pointing to an IPv6 address
If both exist, the accessing end will choose the appropriate protocol based on the local network and system policies. In actual configuration, the host record is usually filled with `@` or `www`, and the record value is the complete IPv6 address.
Firewall and Web Service Listening: Configure IPv6 Port Access
The IPv4 firewall and IPv6 firewall are completely independent. Allowing IPv4 ports 80 and 443 does not guarantee that IPv6 ports will also be accessible.
Linux ip6tables examples for allowing access:
ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 443 -j ACCEPT
Nginx listening to both IPv4 and IPv6:
listen 80;
listen [::]:80;
Apache listening to both IPv4 and IPv6:
listen 80
Or explicitly specify:
listen 0.0.0.0:80
listen [::]:80
Verification results
After configuration, perform the following test to confirm that IPv6 is working correctly:
Server outbound test:
ping6 -c 3 2001:4860:4860::8888
If the ping is successful, the server can access the public IPv6 network. If it returns `Network is unreachable`, it usually means the default route is missing.
External inbound testing: Ping your server's IPv6 address from another IPv6-enabled device. Alternatively, use an online IPv6 testing tool (such as `test-ipv6.com`) to verify.
Assigning an IPv6 address to your VPS is not complicated—confirm that your service provider has assigned an address, configure the network in your system, add DNS AAAA records, allow firewall ports, and verify connectivity. These five steps will get IPv6 truly "running."
Jtti offers cloud server products covering data centers in Hong Kong, Japan, the United States, and Singapore, supporting dual-stack IPv6 deployment. Its Hong Kong node uses bidirectional CN2 GIA premium lines, with latency as low as 12-18ms in South China, providing a stable and smooth network foundation for IPv6 services. Whether you are building a website for IPv6 users or preparing for future network architecture, an IPv6-enabled Jtti cloud server is a reliable starting point.
EN
CN