Configuration de l'IPv6
L'IPv6 peut fonctionner directement dans certains cas. Mais dans d'autres, ou chez certains hébergeurs spécifiques, vous devez activer l'IPv6 manuellement.
Avec un VPS chez OVH
OVH donne une adresse IPv4 et une IPv6 pour ses VPS, mais par défaut, seule l'IPv4 fonctionne. Veuillez regarder The OVH documentation
Configurer le serveur DNS
Also check the documentation for subdomains.
Configurer le serveur
Sur le panneau de gestion d'OVH, vous aller récupérer 3 informations :
- the IPv6 address
- the IPv6 gateway address
- the IPv6 prefix. On OVH's VPS SSD, prefixes are
/128because you have only one IPv6 address.
Sur votre VPS, vous allez créer une sauvegarde de votre fichier de configuration des interfaces réseau dans votre répertoire home avec la commande : cp /etc/network/interfaces ~/interfaces.
Then, you can edit the configuration file (/etc/network/interfaces) with the following.
Découvrir et vérifier avec la commande ip a l'interface utilisée sur votre VPS ( généralement du type ENS3 chez OVH)
Dans cet exemple, nous considérons que votre interface réseau est eth0. Vous devez adapter l'exemple pour correspondre à votre situation.
iface eth0 inet6 static
address <your IPv6 address>
netmask <your IPv6 prefix>
post-up /sbin/ip -6 route add <the IPv6 gateway> dev eth0
post-up /sbin/ip -6 route add default via <the IPv6 gateway> dev eth0
pre-down /sbin/ip -6 route del default via <the IPv6 gateway> dev eth0
pre-down /sbin/ip -6 route del <the IPv6 gateway> dev eth0
Maintenant, enregistrez le fichier et redémarrez les services réseau avec : service networking restart. (TODO : ideally we should find a way to validate the content of the configuration, otherwise it could fuck up the network stack and get disconnected from the VPS ?)
Vérifiez votre configuration avec les commandes :
ip ato display network interfaces and addresseshostname -Ito display the system IP addresses- try to ping an IPv6 server (for example you can use
ping6 ip6.yunohost.org) - try to ping your server from your PC (assuming your PC has IPv6 enabled)
Et voilà !