Skip to main content

[EN] Hetzner Cloud - Install IPV6 Ubuntu 22.04

Hetzner Cloud - IPv6 Setup on Ubuntu 22.04

Hello,

J'ai

I commanderordered una VPS Cloud chezfrom HetznerHetzner, etand ilit's esttrue vraisthat queonce quanddelivered, ilyou estneed livréto ilconfigure faut installer IPV6. IPv6.

PourFor mamy partsetup, jeI'm suisusing sur una CX22 - Cloud.Cloud, Je l'ai installer sousrunning Ubuntu 22.0404.

CommencerStart àby mettreupdating à jours votreyour Cloud server:

 apt update && apt upgrade -y

EnsuiteNext, n'avigueznavigate jusqu'auto fichierthe 50-cloud-init.yaml cefile trouvantlocated dansin netplannetplan:

nano /etc/netplan/50-cloud-init.yaml

VoiciHere votreis configuration parthe default configuration:

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - 2a01:XXX:XXX:XXX::1/64
            dhcp4: true
            match:
                macaddress: 96:XX:XX:XX:XX:XX
            nameservers:
                addresses:
                - 2a01:XXX:XXXX::add:1
                - 2a01:XXX:XXXX::add:2
            routes:
            -   on-link: true
                to: default
                via: fe80::1
            set-name: eth0

VousYou pouvezcan enmake fairea unebackup copie. 
copy:

cp /etc/netplan/50-cloud-init.yaml /etc/netplan/50-cloud-init.yaml.bck

maintenantNow, àon laline ligne11, 11change modifiez  2a01:XXX:XXX:XXX::1/64 ento 2a01:XXX:XXX:XXX::24/64. pourFor l'exemplethis j'aiexample, modifierI enchanged it to ::24.

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - 2a01:XXX:XXX:XXX::24/64 # here change ::1 intoto ::24 here
            dhcp4: true
            match:
                macaddress: 96:XX:XX:XX:XX:XX
            nameservers:
                addresses:
                - 2a01:XXX:XXXX::add:1
                - 2a01:XXX:XXXX::add:2
            routes:
            -   on-link: true
                to: default
                via: fe80::1
            set-name: eth0

EnregistrerSave etthe faitechanges lesand commandesrun the following command:

netplan try

SIIf vousyou avecsee cethis message
message:

** (process:16923): WARNING **: 02:56:51.010: Permissions for /etc/netplan/50-cloud-init.yaml are too open. Netplan configuration should NOT be accessible by others.

FaitePress entrerEnter, etthen maintenantrun cettethis commandecommand c'estto justefix unthe soucispermissions de droitsissue:

sudo chmod 600 /etc/netplan/50-cloud-init.yaml

PourThen, êtrererun relancerthe command:

netplan try

PuisFinally, faiteapply lathe commandechanges suivantwith afinthe d'appliquerfollowing le modification command:

netplan apply

PourTo vérifiezverify vouseverything pouvezis essayerworking, cestry commandesthese :commands:

curl -6 https://ip.hetzner.com
ping -6 google.com
ip a

MobaXterm_t6WyhdoYta.jpgMobaXterm