On Debian 13 OVH VPS how to change the external IPv6?
Jul 24, 7:12pm

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.


Prerequisites

  1. Check OVH IPv6 Assignment

    • Log in to your OVH Cloud Control Panel.
    • Navigate to Public Cloud > Instances > Your VPS > Network.
    • Verify if OVH has assigned a static IPv6 block (e.g., /64 or /128) to your VPS.
    • If not, you may need to request an IPv6 block from OVH support.
  2. SSH Access

    • Ensure you have root or sudo access to your VPS.

Steps to Configure IPv6 on Debian 13

1. Check Current IPv6 Configuration

Run the following command to see your current IPv6 addresses:

bash
ip -6 addr show

or

bash
ifconfig -a | grep inet6

2. Identify Your Network Interface

Find your primary network interface (usually eth0, ens3, or enp0s3):

bash
ip link show

3. Configure Static IPv6 Address

If OVH provides a static IPv6 block, you can manually assign an address.

Option A: Temporary Configuration (for testing)

bash
sudo ip -6 addr add <IPv6_ADDRESS>/64 dev <INTERFACE>

Example:

bash
sudo ip -6 addr add 2001:db8::1/64 dev eth0

Option B: Permanent Configuration (via Netplan or /etc/network/interfaces)

Since Debian 13 uses Netplan by default, edit the Netplan config:

  1. Open the Netplan configuration file:

    bash
    sudo nano /etc/netplan/01-netcfg.yaml

    (or /etc/netplan/50-cloud-init.yaml if using cloud-init)

  2. Add an IPv6 address (replace <IPv6_ADDRESS> and <INTERFACE>):

    yaml
    network:
      version: 2
      renderer: networkd
      ethernets:
        <INTERFACE>:
          dhcp6: false
          addresses:
            - <IPv6_ADDRESS>/64
          gateway6: <IPv6_GATEWAY>  # If OVH provides a gateway

    Example:

    yaml
    network:
      version: 2
      renderer: networkd
      ethernets:
        eth0:
          dhcp6: false
          addresses:
            - 2001:db8::1/64
          gateway6: 2001:db8::ff
  3. Apply the changes:

    bash
    sudo netplan apply

Option C: Using /etc/network/interfaces (Legacy)

If your system uses ifupdown (older Debian versions), edit:

bash
sudo nano /etc/network/interfaces

Add:

bash
iface <INTERFACE> inet6 static
    address <IPv6_ADDRESS>/64
    netmask 64
    gateway <IPv6_GATEWAY>

Then restart networking:

bash
sudo systemctl restart networking

4. Verify the New IPv6 Address

Check if the new IPv6 is assigned:

bash
ip -6 addr show

Test connectivity:

bash
ping6 ipv6.google.com

5. Update OVH Firewall (if applicable)

If OVH has a network firewall, ensure it allows traffic on the new IPv6 address:

  • Go to OVH Control Panel > Network > Firewall.
  • Add rules for ICMPv6, TCP, and UDP as needed.

6. Troubleshooting

  • If IPv6 is not working:

    • Ensure OVH has routed the IPv6 block to your VPS.
    • Check for firewall rules blocking IPv6.
    • Verify gateway connectivity (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:

    bash
    net.ipv6.conf.all.autoconf=0
    net.ipv6.conf.default.autoconf=0

    Then apply:

    bash
    sudo sysctl -p

Final Notes

  • OVH may not allow arbitrary IPv6 changes—ensure the address is part of your allocated block.
  • If you don’t have a static IPv6 block, contact OVH support to request one.
  • For additional IPv6 addresses, OVH may require justification (e.g., hosting multiple services).

Would you like help verifying your OVH IPv6 allocation or troubleshooting a specific issue?

Jul 24, 7:12pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more