IPv6 adoption in Asia-Pacific has accelerated faster than in most other global regions — driven by IPv4 exhaustion, government mandates in China and Japan, and the region’s large mobile internet user base where IPv6 is now the dominant protocol on modern carrier networks. For a Hong Kong VPS, enabling IPv6 is no longer optional for production deployments that need to serve the full range of Asian internet users.
This guide explains why IPv6 matters for Hong Kong VPS deployments, how to enable and configure it on Ubuntu 22.04, and what practical benefits it delivers for Asia-Pacific connectivity.
Why IPv6 Matters Specifically for Hong Kong VPS
China’s IPv6 mandate and adoption trajectory
China has the world’s largest IPv6 user base by absolute numbers, driven by a government mandate requiring ISPs and major platforms to fully support IPv6. China Mobile, China Telecom, and China Unicom have all deployed IPv6 as the default protocol on their 4G and 5G mobile networks. A significant and growing percentage of Chinese mobile internet users connect via IPv6-only or IPv6-preferred connections.
For a Hong Kong VPS serving Chinese users, IPv6 support ensures your server is directly reachable by IPv6-native Chinese mobile users without IPv4-IPv6 translation overhead — which adds latency and introduces potential points of failure.
Japan and South Korea IPv6 deployment
Japan and South Korea have high IPv6 adoption rates in both residential and mobile networks. Japanese ISPs including NTT and KDDI have deployed IPv6 broadly. Korean carriers have similarly high IPv6 penetration. For Hong Kong servers serving these markets, dual-stack (IPv4 + IPv6) support maximises connectivity.
IPv4 address cost and availability
IPv4 addresses have become scarce and expensive in the APAC region — APNIC exhausted its free IPv4 allocation pool in 2011. IPv6 provides effectively unlimited addressing, making it increasingly the preferred protocol for new deployments across the region.
Step 1: Verify IPv6 Availability on Your VPS
# Check if your VPS has an IPv6 address assigned
ip -6 addr show
# Test IPv6 connectivity
ping6 ipv6.google.com
# Check your IPv6 address details
curl -6 https://ipinfo.ioIf your VPS does not have an IPv6 address, contact Server.HK support to request IPv6 allocation — most providers assign IPv6 on request or automatically with newer plans.
Step 2: Enable IPv6 in the Kernel
nano /etc/sysctl.conf# Ensure IPv6 is enabled (remove or set to 0 if previously disabled)
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
# Accept router advertisements for SLAAC address assignment
net.ipv6.conf.all.accept_ra = 2
net.ipv6.conf.default.accept_ra = 2
# Enable IPv6 forwarding (required if routing IPv6 traffic)
net.ipv6.conf.all.forwarding = 1sysctl -pStep 3: Configure Static IPv6 Address (Netplan)
Ubuntu 22.04 uses Netplan for network configuration:
nano /etc/netplan/50-cloud-init.yamlnetwork:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp6: true
addresses:
- YOUR_IPV6_ADDRESS/64
routes:
- to: ::/0
via: YOUR_IPV6_GATEWAY
nameservers:
addresses:
- 2606:4700:4700::1111 # Cloudflare IPv6 DNS
- 2001:4860:4860::8888 # Google IPv6 DNSnetplan applyReplace YOUR_IPV6_ADDRESS and YOUR_IPV6_GATEWAY with the values provided by your VPS provider.
Step 4: Configure Nginx for Dual-Stack (IPv4 + IPv6)
nano /etc/nginx/sites-available/yourdomain.comserver {
# Listen on both IPv4 and IPv6
listen 80;
listen [::]:80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://$host$request_uri;
}
server {
# HTTPS dual-stack
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
# Log real client IP for both IPv4 and IPv6
set_real_ip_from 127.0.0.1;
set_real_ip_from ::1;
real_ip_header X-Forwarded-For;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}Step 5: Update Firewall for IPv6
# UFW handles IPv6 automatically if configured correctly
nano /etc/default/ufwIPV6=yes# UFW rules automatically apply to both IPv4 and IPv6
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 2277/tcp # Your custom SSH port
ufw reload
# Verify IPv6 rules are active
ufw status verbose | grep -i ipv6Step 6: Add IPv6 DNS Records
Add AAAA records to your DNS for IPv6 connectivity:
yourdomain.com AAAA YOUR_IPV6_ADDRESS
www.yourdomain.com AAAA YOUR_IPV6_ADDRESS
mail.yourdomain.com AAAA YOUR_IPV6_ADDRESSWith both A (IPv4) and AAAA (IPv6) records, browsers use IPv6 preferentially (Happy Eyeballs algorithm) — connecting faster for IPv6-capable users while falling back to IPv4 for IPv4-only connections.
Step 7: Verify Dual-Stack Operation
# Test IPv6 web connectivity
curl -6 https://yourdomain.com
# Test IPv4 still works
curl -4 https://yourdomain.com
# Check which protocol visitors are using
# In Nginx access log, IPv6 addresses appear as [2001:xxxx::xxxx]
tail -f /var/log/nginx/access.log | grep -E '\[.*\]'
# External IPv6 test tool
# Visit: https://ipv6test.google.com/ while connected to your server via IPv6IPv6 Performance Considerations for Chinese Users
CN2 GIA routing operates on both IPv4 and IPv6 from Hong Kong data centres. Chinese mobile users connecting via IPv6 over CN2 GIA achieve comparable latency to IPv4 — typically 20–40 ms from major Chinese cities. For Chinese ISP users where IPv6 is the default mobile protocol, native IPv6 connectivity eliminates the NAT64/DNS64 translation step that IPv4-only servers require, reducing connection establishment time.
Conclusion
IPv6 is no longer a future consideration for Hong Kong VPS deployments serving Asia-Pacific users — it is an operational necessity given China’s IPv6-first mobile networks and the broader APAC regional adoption trajectory. Dual-stack configuration with Nginx listening on both [::]:443 and 0.0.0.0:443 ensures every user, regardless of their network protocol preference, connects to your server via the optimal path.
Contact Server.HK support to confirm IPv6 allocation availability on your Hong Kong VPS plan, then follow this guide to complete the dual-stack configuration.
Frequently Asked Questions
Will enabling IPv6 break my existing IPv4 configuration?
No. Dual-stack configuration adds IPv6 alongside existing IPv4 — it does not replace it. IPv4 connectivity continues to work exactly as before. The only risk is if a misconfigured IPv6 firewall rule blocks IPv6 traffic that should be permitted; always test both protocols after configuration changes.
Do Let’s Encrypt SSL certificates work with IPv6?
Yes. Let’s Encrypt verifies domain ownership via HTTP or DNS challenge — both work with IPv6. The certificate itself covers your domain name, not the IP address, so the same certificate serves both IPv4 and IPv6 connections without modification.
Should I prefer IPv6 or IPv4 for internal VPS communication?
For internal communication between services on the same VPS (application to database, application to Redis), use IPv4 loopback (127.0.0.1) — it avoids routing overhead and keeps configuration simple. IPv6 benefits primarily apply to external-facing connections from users on IPv6 networks.