To change the external IPv6 address on a Debian 13 VPS hosted on OVH, you need to follow these steps. OVH typically assigns IPv6 addresses via SLAAC (Stateless Address Autoconfiguration) or DHCPv6, but you can manually configure a static IPv6 address if OVH provides a dedicated IPv6 block.
Check OVH IPv6 Assignment
/64 or /128) to your VPS.SSH Access
Run the following command to see your current IPv6 addresses:
baship -6 addr show
or
bashifconfig -a | grep inet6
Find your primary network interface (usually eth0, ens3, or enp0s3):
baship link show
If OVH provides a static IPv6 block, you can manually assign an address.
bashsudo ip -6 addr add <IPv6_ADDRESS>/64 dev <INTERFACE>
Example:
bashsudo ip -6 addr add 2001:db8::1/64 dev eth0
/etc/network/interfaces)Since Debian 13 uses Netplan by default, edit the Netplan config:
Open the Netplan configuration file:
bashsudo nano /etc/netplan/01-netcfg.yaml
(or /etc/netplan/50-cloud-init.yaml if using cloud-init)
Add an IPv6 address (replace <IPv6_ADDRESS> and <INTERFACE>):
yamlnetwork: version: 2 renderer: networkd ethernets: <INTERFACE>: dhcp6: false addresses: - <IPv6_ADDRESS>/64 gateway6: <IPv6_GATEWAY> # If OVH provides a gateway
Example:
yamlnetwork: version: 2 renderer: networkd ethernets: eth0: dhcp6: false addresses: - 2001:db8::1/64 gateway6: 2001:db8::ff
Apply the changes:
bashsudo netplan apply
/etc/network/interfaces (Legacy)If your system uses ifupdown (older Debian versions), edit:
bashsudo nano /etc/network/interfaces
Add:
bashiface <INTERFACE> inet6 static address <IPv6_ADDRESS>/64 netmask 64 gateway <IPv6_GATEWAY>
Then restart networking:
bashsudo systemctl restart networking
Check if the new IPv6 is assigned:
baship -6 addr show
Test connectivity:
bashping6 ipv6.google.com
If OVH has a network firewall, ensure it allows traffic on the new IPv6 address:
If IPv6 is not working:
ping6 <IPv6_GATEWAY>).If using DHCPv6/SLAAC:
OVH may automatically assign IPv6 via router advertisements (RA). If you want a static address, disable SLAAC in /etc/sysctl.conf:
bashnet.ipv6.conf.all.autoconf=0 net.ipv6.conf.default.autoconf=0
Then apply:
bashsudo sysctl -p
Would you like help verifying your OVH IPv6 allocation or troubleshooting a specific issue?
Vibe can make mistakes. Check answers. Learn more