Benutzer-Werkzeuge

Webseiten-Werkzeuge


public:ovh-ipv6

OVH VPS – IPv6 Reference Configuration

This page describes the correct and production-proven IPv6 configuration for OVH VPS (as of 2026).

The guide is provider-specific (OVH) and based on real-world operation, not on theoretical IPv6 best practices.

Tested with:

  • Debian 11–13
  • Ubuntu 20.04–24.04
  • OVH VPS (KVM)
  • Each OVHcloud VPS server is delivered with an IPv4 address and an IPv6 address.
  • However, only IPv4 is configured by default. If you need to configure IPv6, it has to be set up manually on your system.


NOTE:
This documentation is intended for experienced administrators.

Make sure you fully understand every configuration line before applying it.
IPv6 and networking parameters are environment-specific (provider, routing, firewall, VPN).

Do not use blind copy&paste.

Always adapt addresses, prefixes, interfaces and gateways to your own setup.

Basic Principle (OVH-specific)

OVH does not route real Layer-2 IPv6 prefixes to VPS instances.

This means:

  • There is exactly one global IPv6 address
  • This address is not on-link
  • Neighbor Discovery works only via the gateway

Correct model:

  • IPv6 address with /128
  • Explicit gateway (usually `…::1`)
  • No SLAAC
  • No Router Advertisements
  • No connected `/56` or `/64` prefixes

Important: Using `/56` or `/64` directly on the interface is wrong on OVH and will eventually lead to IPv6 blackholes.


Target State

  • IPv6 address: `2001:41d0:XXXX:YYYY::ZZZZ/128`
  • Default route: `::/0 via 2001:41d0:XXXX:YYYY::1`
  • No RA dependency
  • No on-link prefixes
  • Reboot-safe
  • VPN interfaces (e.g. WireGuard): routing only, no DNS

Variant A – Netplan (systemd-networkd)

Requirements

  • systemd-networkd enabled
  • Netplan in use
  • Cloud-Init networking disabled

Disable Cloud-Init Networking

mkdir -p /etc/cloud/cloud.cfg.d
echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Netplan Configuration

Create the file, for example:

/etc/netplan/60-ovh-ipv6.yaml
network:
  version: 2
  ethernets:
    ens3:
      dhcp4: true
      dhcp6: false
      accept-ra: false
      addresses:
        - 2001:41d0:XXXX:YYYY::ZZZZ/128
      routes:
        - to: ::/0
          via: 2001:41d0:XXXX:YYYY::1
          metric: 100
          on-link: true
      mtu: 1500

Set permissions:

chmod 600 /etc/netplan/60-ovh-ipv6.yaml

Apply (remote-safe):

netplan generate
netplan try

Verification

ip -6 a
ip -6 r

Expected result:

inet6 2001:41d0:XXXX:YYYY::ZZZZ/128
default via 2001:41d0:XXXX:YYYY::1 dev ens3 onlink

Variant B – ifupdown (classic Debian / OVH images)

Many older OVH images still use ifupdown + cloud-init.

The active configuration is usually located here:

/etc/network/interfaces.d/50-cloud-init

Disable Cloud-Init Networking (mandatory)

mkdir -p /etc/cloud/cloud.cfg.d
echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Correct IPv6 Configuration

Edit the file:

nano /etc/network/interfaces.d/50-cloud-init

Wrong (typical OVH default):

iface ens3 inet6 static
    address 2001:41d0:XXXX:YYYY::ZZZZ/56

Correct:

iface ens3 inet6 static
    address 2001:41d0:XXXX:YYYY::ZZZZ/128
    gateway 2001:41d0:XXXX:YYYY::1

No `post-up route add` constructs are required.


Restart Interface (remote-safe)

ifdown ens3 --exclude lo
sleep 1
ifup ens3

Verification

ip -6 a
ip -6 r

Expected:

inet6 2001:41d0:XXXX:YYYY::ZZZZ/128
default via 2001:41d0:XXXX:YYYY::1 dev ens3

Variant C – Static Configuration via /etc/network/interfaces

If cloud-init is not in use:

auto ens3
iface ens3 inet dhcp

iface ens3 inet6 static
    address 2001:41d0:XXXX:YYYY::ZZZZ/128
    gateway 2001:41d0:XXXX:YYYY::1
    mtu 1500

WireGuard – IPv6 Best Practice

WireGuard should provide routing only, not DNS.

Recommended peer configuration:

[Peer]
AllowedIPs = 192.168.0.0/16, fdXX:YYYY:ZZZZ::/48|56|64

Do not use:

  • `::/0`
  • `0.0.0.0/0`
  • `DNS=`

Common Mistakes

Mistake Impact
/56 or /64 on interface broken Neighbor Discovery
SLAAC / accept_ra inconsistent routing
on-link prefixes IPv6 blackholes
Cloud-Init left enabled configuration not reboot-safe
Default route via VPN DNS and routing chaos

Final Checklist

  • [ ] IPv6 address `/128`
  • [ ] Default route via `…::1`
  • [ ] No connected `/56` route
  • [ ] Cloud-Init networking disabled
  • [ ] Reboot test completed
  • [ ] VPN without default tunnel

Key Takeaway

OVH IPv6 works reliably – > if it is operated the way OVH actually routes it.



Links: OVH IPv6 Configuration

public/ovh-ipv6.txt · Zuletzt geändert: von gerson

Seiten-Werkzeuge