IPv6 Configuration
Enable and configure IPv6 on your VPS. Add addresses, firewall and connectivity test.
Check IPv6 Support
# Check if IPv6 is already active
ip -6 addr show
# Check the kernel module
cat /proc/net/if_inet6 | head -5If you have no output, IPv6might be disabled via sysctl.
Enable IPv6 in Kernel
# Check current status
sysctl net.ipv6.conf.all.disable_ipv6
# If it returns 1 (disabled), enable it
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0To make it permanent:
nano /etc/sysctl.confnet.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0sysctl -pIPv6 Address Configuration
Ubuntu / Debian (Netplan)
nano /etc/netplan/01-netcfg.yamlnetwork:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.10/24 # Existing IPv4
- "2001:db8::1/64" # IPv6 assigned by provider
gateway4: 192.168.1.1
gateway6: "2001:db8::1"
nameservers:
addresses:
- "8.8.8.8"
- "2001:4860:4860::8888" # Google DNS IPv6IPv6 Assigned
Find your IPv6 address in the VirtFusion panel → Network, or use ip -6 addr show. Each VPS has a /64 or /128 block depending on the provider.
netplan applyAlpine Linux
Alpine does not use Netplan or NetworkManager. IPv6 must be configured explicitly in /etc/network/interfaces.
First, enable IPv6 in the kernel:
# Check if disabled (returns 1 = disabled)
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
# Enable immediately
echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/default/disable_ipv6Add to /etc/sysctl.conf to persist across reboots:
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0sysctl -pStatic IPv6 in /etc/network/interfaces:
auto eth0
iface eth0 inet6 static
address 2001:db8::1
netmask 64
gateway 2001:db8::1
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6If your provider uses Router Advertisements (SLAAC/DHCPv6):
iface eth0 inet6 auto
pre-up echo 1 > /proc/sys/net/ipv6/conf/eth0/accept_rarc-service networking restartIf the IPv6 address does not appear after restart, check that your provider has assigned an IPv6 block to the VPS. On DeluxHost, go to the VirtFusion panel → Network to verify IPv6 allocation.
AlmaLinux / CentOS (NetworkManager)
nmcli con show # find connection name
nmcli con mod eth0 ipv6.method manual
nmcli con mod eth0 ipv6.addresses "2001:db8::1/64"
nmcli con mod eth0 ipv6.gateway "2001:db8::1"
nmcli con up eth0Test IPv6 Connectivity
# Ping to a public IPv6 server
ping6 ipv6.google.com
ping6 2001:4860:4860::8888
# IPv6 traceroute
traceroute6 ipv6.google.com
# Check IPv6 routing
ip -6 route showIPv6 Firewall (UFW)
UFW manages IPv4 and IPv6 with the same syntax:
# Enable IPv6 in UFW
nano /etc/default/ufw
# Make sure: IPV6=yes
ufw reloadRules: work automatically for both protocols.
ufw allow 22/tcp # SSH (IPv4 and IPv6)
ufw allow 80/tcp # HTTP
ufw allow 443/tcp # HTTPS
ufw enableIPv6 Firewall (ip6tables)
If you use iptables directly:
# Basic ip6tables rules
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
ip6tables -A INPUT -p tcp --dport 22 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT
ip6tables -A INPUT -p tcp --dport 443 -j ACCEPT
ip6tables -A INPUT -p icmpv6 -j ACCEPT # NDP mandatory
ip6tables -A INPUT -j DROP
# Save rules
ip6tables-save > /etc/iptables/rules.v6ICMPv6 Mandatory
Don't block ICMPv6 like you would ICMPv4. IPv6 depends on ICMPv6 for Neighbor Discovery Protocol (NDP), which is essential for routing.
Nginx with IPv6
Make sure Nginx listens on IPv6:
server {
listen 80;
listen [::]:80; # IPv6
listen 443 ssl;
listen [::]:443 ssl; # IPv6
server_name tuodominio.com;
# ...
}AAAA DNS Record
To make your domain work via IPv6, add an AAAA record:
tuodominio.com. IN AAAA 2001:db8::1Verify:
dig AAAA tuodominio.com
nslookup -type=AAAA tuodominio.comFinal Verification
# Assigned address
ip -6 addr show eth0
# Active routes
ip -6 route
# Outbound connectivity
curl -6 https://ipv6.icanhazip.com
# Open port on IPv6
ss -tlnp | grep ':443'