Debian 12 IPv6 Setup

Today I fired up a Debian 12 droplet and enabled IPv6. The instructions for setting up IPv6 on Debian must not have been updated for 12 yet (adding an IPv6 block in /etc/network/interfaces does not work) so I used the instructions for Ubuntu 22.04 which uses netplan. This appears to work and persists on reboot.

However, I noticed this comment in the /etc/netplan/50-cloud-init.yaml file:

# 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}

Changes do persist across reboots like I said so I’m not sure what this message is referring to.

I also commented out /etc/network/interfaces and rebooted. Doesn’t look like this file is even used any more on Debian 12.

Not much of a question here, mostly just notes for anyone else setting up Debian 12 droplets with IPv6.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
August 31, 2023

Thank you for your feedback!

The message you found in the /etc/netplan/50-cloud-init.yaml file indicates that changes made directly to this file may not persist after a reboot, because it’s overwritten by the cloud-init process at startup. However, configurations done the right way via netplan, which eventually writes to this file, should persist over reboots.

If users want to disable the cloud-init’s network configuration capabilities, they need to create a file at /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg and add network: {config: disabled} inside it.

As for /etc/network/interfaces, it is indeed not used anymore on the latest versions of Debian, which now utilize the netplan tool for configuring networking.

Site Moderator
Site Moderator badge
August 20, 2023

Heya @bren0817,

Thank you for the provided information and observations, I’ll be sure to pass this to DigitalOcean’s internal channels so that it can be addressed for future use.

Thanks again for that!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel