How to Enable and Configure IPv6 on Your VPS

IPv6 adoption continues to grow, and many VPS plans include a free IPv6 address alongside IPv4. This guide covers enabling and verifying IPv6 connectivity on your server.

Why IPv6 Matters

  • IPv4 address exhaustion makes IPv6 increasingly important for future-proofing
  • Some networks and mobile carriers prefer or require IPv6 connectivity
  • No NAT required — every device gets a globally unique address

Step 1 — Check If Your VPS Already Has an IPv6 Address

ip -6 addr show

If an address appears under a public interface, IPv6 may already be configured — if not, check your provider's control panel for an IPv6 assignment option, as it's sometimes enabled separately from IPv4.

Step 2 — Verify Network Configuration

On Ubuntu/Debian with netplan:

sudo nano /etc/netplan/50-cloud-init.yaml
network:
  ethernets:
    eth0:
      addresses:
        - 203.0.113.10/24
        - 2001:db8::10/64
      gateway6: 2001:db8::1

Adjust the interface name and addresses to match values provided by your hosting provider.

Step 3 — Apply the Configuration

sudo netplan apply

Step 4 — Verify Connectivity

ping6 -c 4 google.com

Step 5 — Add an AAAA DNS Record

Type: AAAA
Name: @
Value: 2001:db8::10

See DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained.

Step 6 — Configure the Firewall for IPv6

UFW manages both IPv4 and IPv6 rules together by default, but confirm IPv6 support is enabled:

sudo nano /etc/default/ufw
IPV6=yes
sudo ufw disable
sudo ufw enable

Step 7 — Configure Nginx/Apache to Listen on IPv6

In your Nginx server block:

server {
    listen 80;
    listen [::]:80;
    listen 443 ssl;
    listen [::]:443 ssl;
    ...
}

Testing Your Site Over IPv6

curl -6 https://yourdomain.com

Common Errors

IPv6 configured but not reachable externally — verify your provider's network actually routes the assigned IPv6 block to your VPS; contact support to confirm the assignment is active.

Site loads over IPv4 but not IPv6 — confirm the AAAA DNS record exists and the web server is explicitly configured to listen on the IPv6 interface, not just IPv4.

Best Practices

  • Configure both A and AAAA records once IPv6 is set up, so clients can connect via either
  • Test connectivity over IPv6 specifically after any network configuration change
  • Ensure firewall rules cover both IPv4 and IPv6 consistently

FAQ

Do I need IPv6 if my VPS already has IPv4?
Not strictly required for most use cases today, but enabling it costs nothing extra on most plans and improves compatibility with IPv6-only or IPv6-preferring clients.

Related Articles

  • DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained
  • How to Configure UFW Firewall on a Linux VPS
  • How to Configure a Static IP on a Linux VPS
  • ipv6, aaaa record, enable ipv6, network configuration
  • 0 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained

DNS translates human-readable domain names into the information servers actually need — IP...

How to Point a Domain to Your VPS (A/AAAA Records)

Before your website is reachable at yourdomain.com instead of a raw IP address, you need to...

How to Configure MX Records for Email Delivery

MX (Mail Exchange) records tell the internet which servers handle incoming email for your domain....

How to Use CNAME Records Correctly

CNAME records let you alias one domain name to another, but they come with important restrictions...

How to Configure a Static IP on a Linux VPS

Most VPS providers assign a static (unchanging) IP address by default, but understanding how...